Results 1 to 3 of 3

Thread: Usability of StyleSheet in Pure Custom Widget Plugin?

  1. #1
    Join Date
    Jan 2010
    Location
    Ankara - TURKEY
    Posts
    30
    Thanks
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Usability of StyleSheet in Pure Custom Widget Plugin?

    Hi All;

    I have created my own pure custom widget which reimplement paintEvent and draw itself instead of using existing widgets. So this widget plugin pure custom. I have lots of Q_PROPERTY to play in Designer Property Window. My question is could I use my own defined properties in stylesheets to customize look&feel by css? I know there is to many QCssKnownValue but is there any way to introduce my own properties to css parser to understand and can handle form stylesheets.

    I mean think that I have my own property like borderMainColor, so I will add borderMainColor:rgb(241, 83, 255) line to style sheet and it will automatically change this property in runtime?

    Is this possible?
    Thanks in advance.

  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: Usability of StyleSheet in Pure Custom Widget Plugin?

    You can't use CSS with custom widgets unless you are drawing them purely with the use of QStyle.
    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
    Jan 2010
    Location
    Ankara - TURKEY
    Posts
    30
    Thanks
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Usability of StyleSheet in Pure Custom Widget Plugin?

    Quote Originally Posted by wysota View Post
    You can't use CSS with custom widgets unless you are drawing them purely with the use of QStyle.
    Thanks again wysota.
    Regards.

Similar Threads

  1. StyleSheets on a custom widget plugin
    By AwareWolf in forum Newbie
    Replies: 2
    Last Post: 14th December 2009, 13:36
  2. Custom Widget Plugin
    By alisami in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2009, 14:33
  3. Custom widget plugin problem
    By vieraci in forum Qt Tools
    Replies: 1
    Last Post: 27th October 2007, 13:26
  4. Qtopia - custom plugin-widget
    By hgedek in forum Qt Programming
    Replies: 1
    Last Post: 7th September 2007, 19:52
  5. Replies: 5
    Last Post: 21st February 2007, 22:11

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.