<div dir="ltr">Thanks!<div>I usually do not like to write custom code for such things. I think this is a bug on side of the combox implementation to get rid of any native rendering when you set the border style. It falls back to a non-standard style (looks like Win 3.1).<div>

<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 27, 2013 at 1:15 PM, Nurmi J-P <span dir="ltr"><<a href="mailto:jpnurmi@digia.com" target="_blank">jpnurmi@digia.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 27 Nov 2013, at 12:46, Philipp Kursawe <<a href="mailto:phil.kursawe@gmail.com">phil.kursawe@gmail.com</a>> wrote:<br>
<br>
> That's what I already did. I am using the second variant.<br>
><br>
><br>
> On Wed, Nov 27, 2013 at 12:07 PM, Nurmi J-P <<a href="mailto:jpnurmi@digia.com">jpnurmi@digia.com</a>> wrote:<br>
><br>
> On 27 Nov 2013, at 11:10, Philipp Kursawe <<a href="mailto:phil.kursawe@gmail.com">phil.kursawe@gmail.com</a>> wrote:<br>
><br>
> > I wonder if that is a bug:<br>
> > If I style a QComboBox's border with a "2px solid red" it looses its style on the dropdown arrow, which happened to be flat styled (on Windows) and then appears in 3D beveled style like old Win95. No more styles have been applied to this combo via css.<br>


> ><br>
> > Whats going on here?<br>
> ><br>
> > Is there a way to bring back the "default" style (reset a style) on the dropdown sub-control?<br>
> ><br>
><br>
> Try using selectors [*] to avoid applying the border to all children of QComboBox.<br>
><br>
> These two have very different results:<br>
><br>
>     comboBox1->setStyleSheet("border: 2px solid red;”);<br>
>     comboBox2->setStyleSheet("QComboBox { border: 2px solid red; }”);<br>
><br>
> [*] <a href="http://qt-project.org/doc/qt-5.1/qtwidgets/stylesheet-syntax.html#selector-types" target="_blank">http://qt-project.org/doc/qt-5.1/qtwidgets/stylesheet-syntax.html#selector-types</a><br>
<br>
</div>Oh, I missed the “arrow” part. I thought the drop down was getting undesired style changes, which you can avoid by using selectors. Anyway, I’m afraid there’s no way to keep the native arrow whilst applying _stylesheets_ to the other parts of the combo box. Once you apply a stylesheet, you lose the native style.<br>


<br>
What you could do instead is to customize individual primitives/subcontrols (perhaps SC_ComboBoxFrame?) using a proxy style. That way you can keep the native style for the other primitives/subcontrols (eg. SC_ComboBoxArrow).<br>


<br>
<a href="http://doc-snapshot.qt-project.org/qt5-release/qproxystyle.html" target="_blank">http://doc-snapshot.qt-project.org/qt5-release/qproxystyle.html</a><br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
J-P Nurmi<br>
<br>
_______________________________________________<br>
Interest mailing list<br>
<a href="mailto:Interest@qt-project.org">Interest@qt-project.org</a><br>
<a href="http://lists.qt-project.org/mailman/listinfo/interest" target="_blank">http://lists.qt-project.org/mailman/listinfo/interest</a><br>
</div></div></blockquote></div><br></div>