![]() |
Qt input dialog list view
Hi,
I have a QInputDialog in which the user selects some options. The thing I don't like is that it displays a combobox in the dialog. Then you have to click on the combobox, and another dialog appears where you can select your value. Is it possible to get rid of the combobox, and have only the selection list in the first dialog. Maybe some screenshots will clarify: This is what I have now: http://img59.imageshack.us/img59/226...0050913583.png And this is what I would like it to look like: http://img301.imageshack.us/img301/4...0050914013.png Btw. I'm using python My current code: Code:
items = QtCore.QStringList() |
Re: Qt input dialog list view
try using a QDialog or subclassing it.
In a QDialog you could add whatever widget suits you, in this case it seems to me you would like something that could be checked. Perhaps QRadioButton or QCheckbox might help. |
Re: Qt input dialog list view
Hmmm...I'd like to avoid creating another custom dialog.
But regardless, radio buttons are not the way. They are poorly ported, for this use, anyway. They look like "normal radio buttons", and I couldn't get them to expand horizontally, so you have to click on the (very) little circle, or the label to select. Checkbox is also not the answer, because I don't need multiple selection I was hopping I could just pass some flag to QInputDialog. |
Re: Qt input dialog list view
Quote:
You can change the width with setMaximumSize. Even the checkbox is the same case albeit its a bit smaller. :) You can switch off multiple selection in both setting the auto exclusive property |
All times are GMT. The time now is 01:09. |
vBulletin® Version 3.8.8