View Full Version : Not QToolBox - how to build then.
migel
1st August 2012, 11:53
http://radekp.github.com/qtmoko/api/images/designer-choosing-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.
sonulohani
1st August 2012, 12:39
Use QTreeWidget,QPushButton. It is very easy to create it in Qt. You have to look at the documentation.
migel
1st August 2012, 13:56
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);
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.