Results 1 to 3 of 3

Thread: Not QToolBox - how to build then.

  1. #1
    Join Date
    Apr 2011
    Posts
    132
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Not QToolBox - how to build then.

    http://radekp.github.com/qtmoko/api/...osing-form.png

    As image shows I need to build such a toolbox with ability to open all sections. I don't think its possible with QToolBox, so what is the best to build it ? Why there is not such a widget ?

    Thanks.

  2. #2
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Not QToolBox - how to build then.

    Use QTreeWidget,QPushButton. It is very easy to create it in Qt. You have to look at the documentation.
    Heavy Metal Rules. For those about to rock, we salute you.
    HIT THANKS IF I HELPED.

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

    migel (1st August 2012)

  4. #3
    Join Date
    Apr 2011
    Posts
    132
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Not QToolBox - how to build then.

    I don't see my buttons under items. What I do wrong ?

    setColumnCount(1);
    setRootIsDecorated(false);
    setHeaderHidden(true);

    QPushButton *oneButton = new QPushButton(tr("1"));
    oneButton->setAutoFillBackground(true);

    QPushButton *twoButton = new QPushButton(tr("2"));

    QTreeWidgetItem *item1 = new QTreeWidgetItem;
    setItemWidget(item1, 1, oneButton );

    QTreeWidgetItem *item2 = new QTreeWidgetItem;
    setItemWidget(item2, 1, twoButton );

    QList<QTreeWidgetItem *> items;
    items << item1;
    items << item2;

    insertTopLevelItems(1, items);

Similar Threads

  1. QToolBox scrollbar
    By paolom in forum Qt Programming
    Replies: 0
    Last Post: 21st October 2009, 11:27
  2. QToolBox
    By kavinsiva in forum Qt Programming
    Replies: 1
    Last Post: 11th August 2009, 06:19
  3. qtoolbox
    By mickey in forum Qt Programming
    Replies: 3
    Last Post: 1st June 2006, 17:27
  4. QToolBox
    By mickey in forum Newbie
    Replies: 4
    Last Post: 11th February 2006, 15:03
  5. QToolBox
    By mickey in forum Newbie
    Replies: 1
    Last Post: 9th February 2006, 21:21

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.