Changing the layout direction does move the down arrow to the left, but that's not where I expect it to be. I will look at the custom delegate solution tomorrow.
Changing the layout direction does move the down arrow to the left, but that's not where I expect it to be. I will look at the custom delegate solution tomorrow.
gives is close to what I want. (QListView could be QAbstractItemView and padding could be margin with the same visual effect.) The 20px width should be derived from combo somehow, not pulled from thin air. It would also look better if the pulldown did not extend under the arrow.Qt Code:
To copy to clipboard, switch view to plain text mode
You can always create your own style of course.
Better use QLatin1String since it is faster.
As told, look at QStyle. QStyle::subControlRect()The 20px width should be derived from combo somehow, not pulled from thin air
This is more simple than you think. My solution is in Python and PyQt, but you should be able to see the similarities.
Qt Code:
view = comboBox.view() view.setLayoutDirection(Qt.RightToLeft)To copy to clipboard, switch view to plain text mode
Setting the layout direction to right-to-left moves the text in the pulldown further to the right than I want. What I would like is for the pulldown to not extend under the arrow. What's happened since my original posting is I said I would release my application when Qt 4.7 was ready. Well 4.7 was released a few days after my post, and I'm still not quite ready to release. I've stopped working on this relatively minor cosmetic issue for, as Qt bug reports often say, some future release of my program.
Bookmarks