[Development] Styling Qt Quick Items

Alex Montgomery apmontgomery at gmail.com
Thu Apr 24 00:57:37 CEST 2014


Hello,

While trying to style a ComboBox such that its text didn't elide and it
didn't have inexplicably large margins, I was surprised to learn that these
two items would be displayed entirely differently:

ComboBox { model: ["1", "2"] }
ComboBox { model: ["1", "2"]; style: ComboBoxStyle{} }

Which leads me to these questions:
- Is there a reason that a default constructed ComboBoxStyle (and other Qt
Quick style types) is not identical to the style of default constructed
ComboBox?
- Is there a way for someone to define their own style that subtly tweaks
the default style without digging through Qt source code to find the actual
default properties?

I think the style classes would be far more useful if users could define
individual properties that they wanted to change without having to specify
every other property to match the (undocumented) properties set by the
ComboBox constructor.

Regards,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140423/2d7aeb77/attachment.html>


More information about the Development mailing list