Results 1 to 2 of 2

Thread: Qt Designer Style Sheet Resources

  1. #1
    Join Date
    Jan 2007
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Qt Designer Style Sheet Resources

    Hello everyone,

    I'm really new to Qt and am trying to explore the styling capabilities of Qt 4.2. I read that with Qt Designer it is easy to test your CSS. Indeed it is easy to test most of the CSS - just nothing that includes pictures. I suspect that this is due to the resource system but I haven't found a way to make it work. The files that I reference in the CSS just aren't displayed at all!

    Here is a bit of CSS syntax:

    QButton {
    background-image: url(:/images/bg.png);
    }

    Can anyone please tell me what I'm doing wrong here?
    Thanks everyone!

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Designer Style Sheet Resources

    I would suspect that this is due to Designer not loading the resources being created. Does the CSS work if you build the design as a part of a project?

Similar Threads

  1. Custom Style and Qt Designer 3
    By iukpo in forum Qt Tools
    Replies: 1
    Last Post: 23rd January 2007, 00:39
  2. Replies: 13
    Last Post: 15th December 2006, 11:52
  3. How to use style sheet
    By safknw in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2006, 13:05
  4. How to create custom slot in Qt Designer 4.1?
    By jamadagni in forum Qt Tools
    Replies: 31
    Last Post: 18th January 2006, 20:46

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.