Version: (using Devel) OS: Linux Installed from: Compiled sources I use a KComboBox inside a QAbstractItemDelegate subclass and therefor call setFrame( false ) on it. In latest SVN trunk, the Oxygen style does not paint the combobox correctly, it seems it is missing to paint the background and shape. The text and drop down handle is drawn correctly. Attached a screenshot of what it should look like (captured under Qt Platique style) and what it looks like with Oxygen.
Created attachment 40761 [details] combobox as it should look like
Created attachment 40762 [details] combobox as it looks with oxygen
Hi Tobias The behavior you observe (which I agree does not look very nice) is what setFrame(0) does (basically remove all the button specific painting - the frame- and keep the rest), as it is meant to render "flat" widgets, which some styles honor and some dont. Could you try either - leave setFrame at its default value (true) - use setAutoFillBackground( true ); (it should draw a "flat" grey background below the combobox). Tell me if one of the above works.
SVN commit 1090029 by tokoe: Fill the background of the combobox explicitly. /me still wonders why Oxygen behaves differently from all other styles... BUG: 226793 M +1 -0 contactgroupeditordelegate.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1090029
Hej Hugo, setFrame( true ) is no option, then the frame covers most of the cell area and the actual content is nearly invisible (QDefaultItemEditorFactory::createEditor uses the same technique btw) The setAutoFillBackground works, but it is not as good as it has been in previous Oxygen versions... please have a look at it whether it's possible to restore the previous behaviour. setFrame( false ) should hide the stuff around the content, but not e.g. the gradient of the combobox itself. Ciao, Tobias
Yeah well. Indeed this "transparent" combobox when setFrame is zero is indeed a new feature. The idea behind it was that if one want to make a custom widget with a combobox embedded into it, one might want to have the parent background used and not the default one, that by default comes with a frame. Hence the "transparency" when setFrame( false ) is used, that can be overwritten when autoFillBackground is set to true. This was added to the code (a month or to ago) to answer a bug report that basically conflicts with yours. I am not sure I can come with a solution that make both bug reports happy. I tried to look in QComboBox to find if there was another flag that could be used to trigger "flat" comboboxes, but there are none, as far as I can tell. (as for other styles, they can differ in multiple ways: 1/ they use a flat background for main windows and use the same for comboboxes (which we can't do in oxygen since the main window background is not flat, hence the transparency) 2/ they don't honor the noFrame option and would suffer from the same bug as the first one I tried to address)