Results 1 to 3 of 3

Thread: Qml Desktop Components using StyleItems. What is it? Can I change it?

  1. #1
    Join Date
    Aug 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Qml Desktop Components using StyleItems. What is it? Can I change it?

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qml Desktop Components using StyleItems. What is it? Can I change it?

    Quote Originally Posted by hansotronic View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Qml Desktop Components using StyleItems. What is it? Can I change it?

    thank you very much. helped me a lot

Similar Threads

  1. QtCreator and Desktop Components
    By Splashy in forum Qt Quick
    Replies: 6
    Last Post: 24th March 2012, 00:43
  2. Replies: 0
    Last Post: 26th February 2012, 16:48
  3. Replies: 0
    Last Post: 21st May 2011, 22:19
  4. ui components
    By addu in forum Qt Programming
    Replies: 0
    Last Post: 17th September 2009, 14:49
  5. Replies: 5
    Last Post: 31st January 2009, 07:36

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.