Results 1 to 5 of 5

Thread: Shape-Changing Dialog

  1. #1
    Join Date
    Oct 2012
    Posts
    16
    Thanks
    9
    Platforms
    Windows

    Default Shape-Changing Dialog

    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
    Attached Files Attached Files

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Shape-Changing Dialog

    You hide a groupbox and the toogle signal you connect to your main dialog, so fix that:
    Qt Code:
    1. connect(ui->toggleBtn, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool))); //why you connect with "this" instead of what you hide? ui->groupBox1_2
    2. //...
    3. ui->groupBox1_2->hide(); //you hide groupBox1_2 but the connect will hide your whole dialog
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to Zlatomir for this useful post:

    gtnoob (10th November 2012)

  4. #3
    Join Date
    Oct 2012
    Posts
    16
    Thanks
    9
    Platforms
    Windows

    Default Re: Shape-Changing Dialog

    Sorry ... my distraction after a couple of failed attempts.
    How about this version ... still not getting it!?
    Attached Files Attached Files

  5. #4
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Shape-Changing Dialog

    You didn't set the "More" button's checkable to true, use this in code:
    Qt Code:
    1. ui->toggleBtn->setCheckable(true);
    To copy to clipboard, switch view to plain text mode 
    //or check is in Designer

  6. The following user says thank you to Zlatomir for this useful post:

    gtnoob (11th November 2012)

  7. #5
    Join Date
    Oct 2012
    Posts
    16
    Thanks
    9
    Platforms
    Windows

    Default Re: Shape-Changing Dialog

    Arghhh ... this easy
    Thanks a lot.

Similar Threads

  1. Changing cursor shape
    By Odyseusz in forum Qt Programming
    Replies: 7
    Last Post: 22nd November 2011, 16:39
  2. Replies: 0
    Last Post: 18th January 2011, 16:59
  3. Replies: 3
    Last Post: 29th December 2008, 16:54
  4. Shape changing under other tab using slider/spinbox
    By kramed in forum Qt Programming
    Replies: 2
    Last Post: 7th August 2007, 19:59
  5. Shape-changing dialog with qt4.1
    By moe in forum Qt Tools
    Replies: 3
    Last Post: 2nd February 2006, 10:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.