Is it ok to add Widgets to Widgets?
-
Hi,
I have class which inherits QComboBox - myComboBoxIs it ok to create in myComboBox's constructor new widget for example QPushButton like this:
myComboBox constructor { button = new QPushButton(this); button->setFixedSize(10,10); button->move(100,10); }
? Or this may be dangerous?
-
Hi,
I have class which inherits QComboBox - myComboBoxIs it ok to create in myComboBox's constructor new widget for example QPushButton like this:
myComboBox constructor { button = new QPushButton(this); button->setFixedSize(10,10); button->move(100,10); }
? Or this may be dangerous?
-
Hi,
I have class which inherits QComboBox - myComboBoxIs it ok to create in myComboBox's constructor new widget for example QPushButton like this:
myComboBox constructor { button = new QPushButton(this); button->setFixedSize(10,10); button->move(100,10); }
? Or this may be dangerous?
Is it ok to add Widgets to Widgets?
If that would be not ok, you could close this forum and put Qt to the bin ;-)
@qwe3 said in Is it ok to add Widgets to Widgets?:
button->setFixedSize(10,10);
button->move(100,10);The only "ugly" thing here is that your button is not part of the internal layout (I think you cant do that anyway), so if you resize or move your checkBox, the button will look always the same