Results 1 to 2 of 2

Thread: Who is my layout?

  1. #1
    Join Date
    May 2007
    Location
    Huntsville, Alabama
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Who is my layout?

    If I were a button, how might I found out what layout I reside in?

    I'm trying to get the layout I reside in through a ButtonGroup connection. I will loop through the layout's children and find another widget in my same layout. I know how to loop through a layout, just not how to find out which one the button is in.

    James

  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: Who is my layout?

    That would be
    Qt Code:
    1. parentWidget()->layout()
    To copy to clipboard, switch view to plain text mode 
    but I highly recommend looking for another possibilities to communicate between those two widgets. How about using for example signals and slots?
    J-P Nurmi

Similar Threads

  1. changing layout of a widget
    By mikro in forum Qt Programming
    Replies: 10
    Last Post: 4th August 2009, 20:21
  2. Qt layout memory issue
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 25th August 2007, 17:11
  3. Resizing problems when applying a layout
    By JimBrown in forum Newbie
    Replies: 1
    Last Post: 21st February 2007, 22:54
  4. "dynamic" layout
    By hulk in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2006, 07:16
  5. QT4 layout of complex dialog is very slow
    By cboles in forum Qt Programming
    Replies: 15
    Last Post: 28th April 2006, 19:57

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.