Results 1 to 2 of 2

Thread: qhlayout

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Question qhlayout

    Hi, I'd like need below but appear only a checkBox and I think this not work totally;
    I need put 8 check box in a horizontally layout; why this don't work properly? Thanks
    Qt Code:
    1. QWidget* wid = new QWidget(myFrame);
    2. QBoxLayout* hlay = new QHBoxLayout (wid,5,5);
    3. QCheckBox* c0 = new QCheckBox(wid);
    4. QCheckBox* c1 = new QCheckBox(wid);
    To copy to clipboard, switch view to plain text mode 
    Regards

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qhlayout

    Add widgets to your layout by using hlay->addWidget() and then use wid->setLayout(hlay) at the end
    Last edited by munna; 1st April 2006 at 19:28.

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

    mickey (1st April 2006)

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.