Results 1 to 4 of 4

Thread: QWidget stylesheet problem!

  1. #1
    Join Date
    Jun 2011
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default QWidget stylesheet problem!

    I have a QWidget and i set border image for it. But it don't show image:
    css:
    QWidget
    {
    border-image: url(:/anhnen.jpg);
    }
    i seached in google but i not found. Help me.

  2. #2
    Join Date
    Apr 2011
    Location
    Russia
    Posts
    85
    Thanks
    2
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWidget stylesheet problem!


  3. #3
    Join Date
    Jun 2011
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: QWidget stylesheet problem!

    hmm! i try load image .png, but it not successfull.


    Added after 1 9 minutes:


    yeah, i resolved it. Thank you.
    Last edited by tamnv110; 17th August 2011 at 03:46.

  4. #4
    Join Date
    Jul 2011
    Posts
    42
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWidget stylesheet problem!

    assuming that you have a resources file, and the file 'anhnen.jpg' has been added to it, did you store the file in the root of the resources or inside a folder?

    resources/
    anhnen.jpg

    or

    resources/
    something/
    anhnen.jpg -->this case would be url(:/something/anhnen.jpg);

Similar Threads

  1. Problem with QToolButton + stylesheet
    By Bagration in forum Qt Programming
    Replies: 0
    Last Post: 14th December 2010, 04:32
  2. StyleSheet problem
    By fmariusd in forum Qt Programming
    Replies: 0
    Last Post: 22nd February 2010, 16:10
  3. QListWidget - stylesheet problem
    By febil in forum Qt Programming
    Replies: 3
    Last Post: 23rd February 2009, 16:44
  4. how to set stylesheet for two QWidget
    By phillip_Qt in forum Qt Programming
    Replies: 3
    Last Post: 10th April 2008, 14:22
  5. Stylesheet (css) problem
    By madcama in forum Newbie
    Replies: 1
    Last Post: 4th December 2006, 22:41

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.