[Kde-bindings] Qt::Accel in qtruby
jm
jm at transact.com.au
Thu Jul 1 05:57:02 UTC 2004
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)
18:
accel.connectItem(accel.insertItem(Qt::KeySequence.new(Qt::
Key_Return)),
19: self, SLOT('close()'))
outputs
#<Qt::KeySequence:0x4129d2bc>
./test.rb:17:in `method_missing': unresolved method call (ArgumentError)
from ./tvscreen.rb:17:in `initialize'
from ./tvscreen.rb:113:in `new'
from ./tvscreen.rb:113
$rbqtapi -r QAccel::insertItem
int QAccel::insertItem(const QKeySequence&)
int QAccel::insertItem(const QKeySequence&, int)
the above code is based on
QAccel *accel = new QAccel( this );
accel->connectItem( accel->insertItem( Key_Enter ),
this, SLOT(fire()) );
from http://doc.trolltech.com/3.3/t14-gamebrd-cpp.html self has
inherited from Qt::Widget. thoughts? I've tried with and without the
'-1' as the last parameter in the hope of fooling the qtruby's
signature matching.
J.
More information about the Kde-bindings
mailing list