Results 1 to 5 of 5

Thread: Widget Promotion

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2011
    Posts
    48
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    6

    Default Re: Widget Promotion

    Thanks for reply ... Actually I want to create similar 16 pages with so many widgets like checkboxes. I want to connect the checkbox of 16 pages to some signal from one different page. For this I need to connect each and every checkbox separately to the signal. This is taking much time . If I create instance for the frame class on each page , again I need to connect all the checkboxes separately . So can you suggest me any other method ?


    One more thing ,

    relayFrame = new Frame();
    ui->tabWidget->insertWidget(5,relayFrame);
    ui->tabWidget->insertWidget(6,relayFrame);


    Can I use the same object of one class as widget on two different pages of tab or stackedwidget??

    Please help...

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: Widget Promotion

    One more thing ,

    relayFrame = new Frame();
    ui->tabWidget->insertWidget(5,relayFrame);
    ui->tabWidget->insertWidget(6,relayFrame);


    Can I use the same object of one class as widget on two different pages of tab or stackedwidget??
    NO. A widget object can live on only stackedwidget/tab page at any given point in time. It can be moved onto the different stackedwidget/tab page, note that moving the widget object will remove itself from the previous stackedwidget/tab page.

    Check this example
    Attached Files Attached Files
    Last edited by Santosh Reddy; 30th January 2013 at 08:20.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

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

    A9am (6th February 2013)

Similar Threads

  1. QWidget promotion with child widgets
    By Phlucious in forum Qt Programming
    Replies: 3
    Last Post: 22nd February 2012, 08:41
  2. Replies: 8
    Last Post: 2nd February 2012, 20:52
  3. Replies: 2
    Last Post: 23rd January 2012, 18:06
  4. Replies: 1
    Last Post: 24th June 2011, 00:09
  5. promotion problems with designer
    By szisziszilvi in forum Qt Programming
    Replies: 3
    Last Post: 26th April 2011, 09:27

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
  •  
Qt is a trademark of The Qt Company.