Results 1 to 2 of 2

Thread: background-image problem

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default background-image problem

    Hi,

    I can set the backgorund of the widget from the designer and see the background set when I run the ui from the designer. However, when I start the applciation from IDE, it doesn't appear.

    Qt Code:
    1. QWidget#LogDialog{background-image:url(:/images/bg.png);}
    To copy to clipboard, switch view to plain text mode 

    I check the file path and it's correct. And widget can display any styles I gave from the designer but background-image. What coyuld be the problem?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: background-image problem

    Options:
    • The path to the resource is incorrect
    • The image file is corrupt
    • There is no QWidget with the objectName() "LogDialog"
    • There is no PNG image format plugin available on the test system

Similar Threads

  1. QStackWidget background image problem
    By zgulser in forum Qt Programming
    Replies: 3
    Last Post: 7th May 2012, 16:04
  2. Replies: 0
    Last Post: 5th April 2011, 13:36
  3. Replies: 10
    Last Post: 10th November 2010, 03:12
  4. Replies: 0
    Last Post: 9th July 2010, 14:06
  5. BIG Problem with Background-image using Style Sheets
    By PiXeL16 in forum Qt Programming
    Replies: 1
    Last Post: 28th November 2007, 22:10

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.