Results 1 to 9 of 9

Thread: how to apply stylesheet defined in .qss file to qt application

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: how to apply stylesheet defined in .qss file to qt application

    Quote Originally Posted by phillip_Qt View Post
    As far my understand I think qss(qt Style sheet) is also a resources
    That's not true.
    and Q_INIT_RESOURCES is required to initialise all resources.
    That's not true as well.

    "Qt resources" is a virtual filesystem, nothing more, nothing less. Stylesheets have nothing to do with files and in this particular case the stylesheet is loaded from an external and real file.

    Q_INIT_RESOURCES is only needed if you want to initialize resources that are embedded int a static library on some of the platforms. It' required to link them to the filesystem already existing in the application.

  2. #2
    Join Date
    Oct 2007
    Posts
    201
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    19
    Thanked 1 Time in 1 Post

    Default Re: how to apply stylesheet defined in .qss file to qt application

    Quote Originally Posted by wysota View Post
    That's not true.

    That's not true as well.

    "Qt resources" is a virtual filesystem, nothing more, nothing less. Stylesheets have nothing to do with files and in this particular case the stylesheet is loaded from an external and real file.

    Q_INIT_RESOURCES is only needed if you want to initialize resources that are embedded int a static library on some of the platforms. It' required to link them to the filesystem already existing in the application.
    Thank you very much
    But i ve a doubt, can i use Q_INIT_RESOURCE macro in a dll.?
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

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

    Default Re: how to apply stylesheet defined in .qss file to qt application

    Do you need the macro? Yes, you can use it, but you probably don't have to.

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
  •  
Qt is a trademark of The Qt Company.