Results 1 to 4 of 4

Thread: Access an QHBoxLayout, which name you don't know

Hybrid View

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

    Default Re: Access an QHBoxLayout, which name you don't know

    Qt Code:
    1. qobject_cast<QHBoxLayout *>(gb->layout())->setDirection( QBoxLayout::TopToBottom );
    To copy to clipboard, switch view to plain text mode 

    works fine.

    Thanks a lot, Lykurg.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Access an QHBoxLayout, which name you don't know

    Something like this would be better:
    Qt Code:
    1. QHBoxLayout *l = qobject_cast<QHBoxLayout *>(gb->layout());
    2. if(l) l->setDirection( QBoxLayout::TopToBottom );
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Error in connecting to MS ACCESS
    By cutie.monkey in forum Qt Programming
    Replies: 0
    Last Post: 9th September 2008, 02:10
  2. class QHBoxLayout
    By csvivek in forum Installation and Deployment
    Replies: 2
    Last Post: 10th April 2008, 07:57
  3. Help with alignment
    By IsleWitch in forum Newbie
    Replies: 1
    Last Post: 20th October 2007, 18:20
  4. Access Violation on Signal Emit
    By khagzan in forum Qt Programming
    Replies: 2
    Last Post: 25th September 2007, 22:51
  5. QHBoxLayout Problem
    By Seema Rao in forum Qt Programming
    Replies: 5
    Last Post: 29th April 2006, 15:51

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.