Qt does only what you tell it to do.Originally Posted by djoul
Indeed, the problem is in constructor. If you create a widget without a parent, it will be created as a standalone window. So your constructor should be implemented like this:And the Mother class must pass this parent to QWidget's constructor.Qt Code:
: Mother( parent ) { ... }To copy to clipboard, switch view to plain text mode
That "= 0" part only indicates a default value for the parameter.I never know if I need to specify *parent or *parent=0
Bookmarks