Gunnar Sletta wrote:
> QWidget window = new QWidget();
> QPushButton button = new QPushButton(window) {
> public void disposed() {
> // something...
> }
> }
I see that I completely messed up my own example here.. The proper code
should have been:
class Window extends QWidget {
public Widget() {
QPushButton button = new QPushButton("Hello", window) {
public void disposed() { ... }
}
}
}
The clue is that the child is an inner class of its parent, thus having
an implicit outer-class reference to the toplevel preventing it from
being destroyed.
-
Gunnar
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest