[Kde-pim] QComboBox/ItemDelegate question
Stephen Kelly
steveire at gmail.com
Thu Nov 5 14:21:00 GMT 2009
Tobias Koenig wrote:
> On Wed, Nov 04, 2009 at 07:17:27PM +0100, Tobias Koenig wrote:
>> On Wed, Nov 04, 2009 at 03:46:10PM +0000, Stephen Kelly wrote:
> Hej,
>
>> > Have you considered putting the data into a multi column list or table
>> > like a QStandardItemModel and putting that model into the combobox? You
>> > should be able to put the description in the second column.
>> Unfortunately that doesn't fix the issue, that the popup menu is too
>> thin, with a QTableView the content of the items is only shown half...
> I've implemented it the following way now:
>
> - install an event filter on QComboBox::view()->viewport()
> - listen for the 'QEvent::Show' event of the viewport
> - resize the viewport->parentWidget()->parentWidget() to the according
> size
>
> not really convenient but it allows one to have a popup menu with a
> different width than the combobox.
>
> Ciao,
> Tobias
Cool, thanks for the info.
Steve.
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list