PDA

View Full Version : Qml Desktop Components using StyleItems. What is it? Can I change it?



hansotronic
10th March 2012, 09:50
Hey guys,

i am playing around with the Qml Components for the desktop and I would like to adapt their behavior to create my own custom components. The thing I don't understand is where the StyleItem element comes from or where it is located. I imagine that it is some kind of system-specific item library that is created during installation of the components and that defines their look.

So my question:

Is it possible to replace these StyleItems with my own custom components so that i can create os independent components while maintaining the original behavior?

thank you guys

wysota
11th March 2012, 12:20
The thing I don't understand is where the StyleItem element comes from or where it is located.

It's in src/qstyleitem.{h,cpp} of the Components source bundle.


Is it possible to replace these StyleItems with my own custom components so that i can create os independent components while maintaining the original behavior?
They already are system independent. Their look is taken from the active QStyle (at least that's what I'd expect). So if you want a custom look then implement your own QStyle subclass.

hansotronic
16th March 2012, 14:22
thank you very much. helped me a lot :)