Results 1 to 3 of 3

Thread: Layering QWidgets inside a QWidget

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Layering QWidgets inside a QWidget

    Hey there,

    I'm trying to develop a widget that can :
    - Display several layered / on top of each other widgets.

    First off has anyone ever developped a QLayout / QWidget that can do that ?

    In my implementation every time I resize my main widget I'm resizing every child widgets.

    I've implemented a minimumSizeHint in my widget that takes the layered widget minimum size into account.

    Only problem is my minimumSizeHint never gets called when resizing manually the window.

    So I get my widgets layered but my main widget window doesn't take their minimum size into account.

    How can I solve this ?

    Thanks.

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Layering QWidgets inside a QWidget

    Sounds like you need QStackedWidget.
    I'm a rebel in the S.D.G.

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

    bunjee (2nd November 2008)

  4. #3
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Layering QWidgets inside a QWidget

    Thanks,

    Since QStrackedLayout wasn't enough,
    I had to developp my own layout, this turned out to be easier to do than I expected.

Similar Threads

  1. QWidget inside MFC project
    By hINTModuleState in forum Newbie
    Replies: 3
    Last Post: 9th October 2015, 15:22
  2. Allow Many QWidgets to be Shown into One QWidget ?
    By Fatla in forum Qt Programming
    Replies: 26
    Last Post: 6th July 2008, 09:29
  3. running an app inside QWidget ?
    By drake1983 in forum Newbie
    Replies: 2
    Last Post: 14th March 2008, 15:33
  4. Replies: 2
    Last Post: 1st January 2008, 13:31
  5. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 22:59

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.