Results 1 to 3 of 3

Thread: QStackWidget layoutspacing

  1. #1
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question QStackWidget layoutspacing

    I had originally had my widgets all lined up etc. Well I wanted to be able to switch out widgets with the click of a button, so hey why not use a QStackWidget? Well when I put my QTreeView in this it has new offset my listview compared to the others and I have no way to say stackWidget->setLayoutSpacing(0) or something similar so it's literally transparent?

    Is there a way to overlap widgets without using QStackWidget? Or is there a way to set spacing correctly, i.e. 0.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QStackWidget layoutspacing

    Perhaps:
    Qt Code:
    1. stackedWidget->layout()->setMargin(0);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. #3
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QStackWidget layoutspacing

    That didn't work, it may just be the qwidgetstack nature? Is there any other way to overlay widgets?

Similar Threads

  1. Reuse a Qwidget with a QStackWidget
    By ucomesdag in forum Qt Programming
    Replies: 4
    Last Post: 25th April 2007, 02:47

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.