-
Which widget?
Hi,
I want to build something like QToolWidget but I want to expand more than one pages. And also make it nicer. I mean something else for expanding than big buttons which are in QToolBox. Something like this: http://img295.imageshack.us/img295/6115/panelsl5.jpg http://img301.imageshack.us/img301/3333/panel2st2.jpg
Which widget may I use?
-
Re: Which widget?
several.
Combine several using QLayouts (or rather subclasses like QVBoxLayout)
-
Re: Which widget?
Hmm. But how can I make similar function like these one on the pictures? Which widgets may I combine?
-
Re: Which widget?
I am not familiar with the program your dialog is from.
But the thigs look like:
* QToolBox (perhaps)
* each containing
QCheckBoxes
QSpinBoxes
QRadioButtons
QGroupBoxes
QPushButtons
QLabels
Take a look at the Qt widget gallery.
(http://doc.trolltech.com/4.4/gallery-plastique.html)
-
Re: Which widget?
Ehm, you didnt understand me. I dont want to make exactly what is in the picture. I want to create the system of tabbing the widgets. Something like is QToolBox but I want to expand more than one pages. I want only the expanding system like is on the pictures not the widgets which are exactly there.
-
Re: Which widget?
If I remember well the widget box of Qt designer is a tree view (or tree widget which does not make much difference as far as the look and feel is concerned). If you're interested in achieving the same llok for top level items have a look at the source code I'm sure it's not that complicated. Then, use setItemWidget() to display complex widgets instead of simple model items.
-
Re: Which widget?
Thank you. I have seen the designer source but you are right it is a tree view. But I want to cover every page by some other widgets like on the second picture. How can I do that?
-
Re: Which widget?
QAbstractItemView::setIndexWidget() or QTreeWidget::setItemWidget should do, depending on which approach (model/view or item) you prefer, the later being the most sensible if you want every items to be replaced by widgets.