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
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:
Qt 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 dialogTo copy to clipboard, switch view to plain text mode
gtnoob (10th November 2012)
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 DesignerQt Code:
ui->toggleBtn->setCheckable(true);To copy to clipboard, switch view to plain text mode
gtnoob (11th November 2012)
Arghhh ... this easy
Thanks a lot.
Bookmarks