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.
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.
Re: Not QToolBox - how to build then.
I don't see my buttons under items. What I do wrong ?
Quote:
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);