 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Stefan Champailler
RE: Actions and signals [ reply ] 2012-04-10 15:14
|
Well, it's been a long time since I've used RubyQt (I've moved to PySide)... But for the record, and with experience, I'm now 100% sure that the code I've posted is plain wrong : quitAction will most probably be GC'ed before Qt starts using it => dangling pointers...
At least, in 9 months, I've learned something :)
stF
|
By: Stefan Champailler
Actions and signals [ reply ] 2011-06-23 09:59
|
Hello,
Is this right to write :
def method
quitAction = fileMenu.addAction(tr("E&xit"))
connect(quitAction, SIGNAL('triggered()'), $qApp, SLOT('quit()'))
end
That is, I leave a connection on an object (quitAction) that will be destroyed as soon as I leave the method.
Is this OK ?
stF
|
|
 |