Версия для печати темы

Нажмите сюда для просмотра этой темы в обычном формате

Форум на CrossPlatform.RU _ Qt GUI _ ComboBox с выпадающим списком в виде дерева

Автор: Robin Bobin 24.6.2012, 17:05

Подскажите, как в Qt сделать такой комбобокс, как например в Thunderbird(Message > Create filter from message>perform these actions)? и чтобы можно было иконки выставлять для каждого элемента. Есть готовые примеры?

Спасибо.

Автор: ViGOur 25.6.2012, 22:17

Смотри http://www.doc.crossplatform.ru/qt/4.7.x/html-qt/qcombobox.html#setView, вот что он может:

Цитата
Sets the view to be used in the combobox popup to the given itemView. The combobox takes ownership of the view.

Note: If you want to use the convenience views (like QListWidget, QTableWidget or QTreeWidget), make sure to call setModel() on the combobox with the convenience widgets model before calling this function.

See also view().


Автор: Robin Bobin 26.6.2012, 0:34

Цитата(ViGOur @ 25.6.2012, 23:17) *
Смотри http://www.doc.crossplatform.ru/qt/4.7.x/html-qt/qcombobox.html#setView, вот что он может:
Цитата
Sets the view to be used in the combobox popup to the given itemView. The combobox takes ownership of the view.

Note: If you want to use the convenience views (like QListWidget, QTableWidget or QTreeWidget), make sure to call setModel() on the combobox with the convenience widgets model before calling this function.

See also view().



Спасибо, буду разбираться. Сообщу о результате.

Форум Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)