Results 1 to 3 of 3

Thread: How to change a widget to other widget in layout?

  1. #1
    Join Date
    Mar 2010
    Posts
    68
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default How to change a widget to other widget in layout?

    I have a form (widget form) on this form has 3 widgets: header, centralWidget, footer. A vertical layout to wrap them, like this:

    __________________________________________________ ______________
    |
    | Header Widget contains Navigation To other forms
    |_________________________________________________ ______________
    |
    |
    |
    | Central Widget
    |
    |
    |
    |_________________________________________________ ______________
    |
    | Footer Widget
    |_________________________________________________ ______________

    The footer and header widget are no changes, but Central Widget always change when users click any items of the navigation.

    My question is: How to change the Central Widget to other widget when click on a button? Which classes helps me do this?
    Last edited by Kevin Hoang; 20th March 2010 at 11:35.

  2. #2
    Join Date
    Nov 2008
    Posts
    39
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to change a widget to other widget in layout?

    try to use the Wizard or else try to change central widget when ever the button is clickedby using the SetCentralWidget function

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

    Kevin Hoang (20th March 2010)

  4. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to change a widget to other widget in layout?


  5. The following user says thank you to Lykurg for this useful post:

    Kevin Hoang (20th March 2010)

Similar Threads

  1. Replies: 2
    Last Post: 22nd February 2010, 08:48
  2. Widget layout in GridLayout
    By Dato0011 in forum Qt Programming
    Replies: 8
    Last Post: 7th December 2009, 09:26
  3. changing layout of a widget
    By mikro in forum Qt Programming
    Replies: 10
    Last Post: 4th August 2009, 20:21
  4. Layout (widget overlay)
    By whitefurrows in forum Qt Programming
    Replies: 3
    Last Post: 3rd July 2009, 23:54
  5. Hide widget, but not change layout
    By dimaz in forum Qt Programming
    Replies: 3
    Last Post: 21st November 2008, 14:32

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.