Hi
I was testing the Shape-Changing Dialog in the Jasmin Blanchette Qt4 book.
I tried to reproduce but the group box i hide never show up again.
Better than pasting the code here e will attach it.
Could someone take a look?
Thanks
Printable View
Hi
I was testing the Shape-Changing Dialog in the Jasmin Blanchette Qt4 book.
I tried to reproduce but the group box i hide never show up again.
Better than pasting the code here e will attach it.
Could someone take a look?
Thanks
You hide a groupbox and the toogle signal you connect to your main dialog, so fix that:
Code:
connect(ui->toggleBtn, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool))); //why you connect with "this" instead of what you hide? ui->groupBox1_2 //... ui->groupBox1_2->hide(); //you hide groupBox1_2 but the connect will hide your whole dialog
Sorry ... my distraction after a couple of failed attempts.
How about this version ... still not getting it!?
You didn't set the "More" button's checkable to true, use this in code:
//or check is in DesignerCode:
ui->toggleBtn->setCheckable(true);
Arghhh ... this easy :o
Thanks a lot.