[Kde-bindings] Qt::Accel in qtruby

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Jul 1 10:02:26 UTC 2004


On Thursday 01 July 2004 08:39, Alexander Kellett wrote:
> On Thu, Jul 01, 2004 at 03:57:02PM +1000, jm wrote:
> > problem code
> >
> > 15:  @accel = Qt::Accel.new(self)
> > 16:  p Qt::KeySequence.new(Qt::Key_Return)
> > 17:  p accel.insertItem(Qt::KeySequence.new(Qt::Key_Return), -1)
>
> i'm clueless wrt this... but on the of chance
> are you sure this shouldn't be
>
> 17:  p accel.insertItem(Qt::Key_Return)
No it looks ok to me, in t14/gambrd.rb this code works fine:

@accel = Qt::Accel.new( self )
@accel.connectItem( @accel.insertItem( Qt::KeySequence.new(Qt::Key_Enter) ),
                            self, SLOT('fire()') )
@accel.connectItem( @accel.insertItem( Qt::KeySequence.new(Qt::Key_Return) ),
                            self, SLOT('fire()') )
@accel.connectItem( @accel.insertItem( Qt::KeySequence.new(Qt::CTRL+Qt::Key_Q) 
),
$qApp, SLOT('quit()') )

-- Richard



More information about the Kde-bindings mailing list