PDA

View Full Version : Widgets inside ListWidget ?



drake1983
18th April 2008, 16:19
Hi,
I have a Widget called VideoItem, it's a QWidget objetc with some buttons inside, also I have the main widget called MainWidget with a ListWidget to the left and a PushButton to the rigth, I need to add a new VideoItem to the ListWidget when I press the PushButton.

I have tried using QListWidgetItem but it doesnt work for me.

Am I using the correct widget to display the VideoItems ? Any idea, any help ?

Basically, I need to show a list of widgets inside a ListWidget, with a vertical scrollbar, like the Add/Remove Programas MS Windows Control Panel .

Thanks and forgive me my english.

aamer4yu
18th April 2008, 16:45
QListWidget takes string or QListWidgetItem objects.

For you solution I guess QListView will be useful, but am not sure how.

I have another idea -
Instead of QListWidget, use a QFrame. and apply a QVBLayout to it.
Then at runtime, add widgets to the layout. I guess this will work. Only am not sure if it will display scrollbars.


Or in Qt 4.4 u can use widgets in the graphics view.