Results 1 to 2 of 2

Thread: QGroupBox

  1. #1
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default QGroupBox

    hi all, i need to write this below command,

    Qt Code:
    1. ui.groupBox_2->addWidget(endDeviceCombox);
    To copy to clipboard, switch view to plain text mode 
    but the error came out with "error C2039: 'addWidget' : is not a member of 'QGroupBox'"

    is there any other way to add this widget?

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGroupBox

    Qt Code:
    1. QVboxLaout* l= new QVboxLayout;
    2. l->addWidget(endDeviceCombox);
    3. ui.groupBox_2->setLayout(l);
    To copy to clipboard, switch view to plain text mode 
    or get the groupbox layout by
    Qt Code:
    1. /*QVBoxLayout QHBoxLayout or whatever you set in ui*/ *l = ui.groupBox_2->layout();
    2. l->addWidget(endDeviceCombox);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QWidget inside QGroupbox semi transparent [Qt 4.3.1]
    By desch in forum Qt Programming
    Replies: 7
    Last Post: 26th February 2009, 10:00
  2. Minimum QGroupBox size
    By klnusbaum in forum Qt Programming
    Replies: 3
    Last Post: 19th June 2008, 17:22
  3. Dynamically changing QGroupBox size
    By T4ng10r in forum Qt Programming
    Replies: 5
    Last Post: 30th March 2007, 15:02
  4. QGroupBox Issues
    By ToddAtWSU in forum Qt Programming
    Replies: 8
    Last Post: 16th January 2007, 13:45
  5. QGroupBox title truncated on both sides
    By Gopala Krishna in forum Qt Programming
    Replies: 2
    Last Post: 7th October 2006, 15:02

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.