Results 1 to 4 of 4

Thread: Image is visible in QDesigner and invisible at run-time

  1. #1
    Join Date
    Jul 2007
    Posts
    121
    Thanks
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Image is visible in QDesigner and invisible at run-time

    I assigned pixmap to a label. It is visible in designer but is invisible in runtime. I tried to change the format from jpeg to png with no effect - it is visible in designer and invisible in runtime. There is no code that I wrote to manage visibility of QLabel and no property that I changed in QLabel in design mode (by the way, I don't see "isvisible" property in property editor)

    I am sure I overlooked smth, but can't figure out what causes this. Any help to figure this out will be greatly appreciated.

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Image is visible in QDesigner and invisible at run-time

    Is the image part of your resources?

  3. The following user says thank you to munna for this useful post:

    QPlace (14th May 2009)

  4. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Image is visible in QDesigner and invisible at run-time

    Deisgner knows about the path of the image. While when you run the app, it doesnt know.
    As Munna said, make that image as part of your qrc

  5. The following user says thank you to aamer4yu for this useful post:

    QPlace (14th May 2009)

  6. #4
    Join Date
    Jul 2007
    Posts
    121
    Thanks
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Image is visible in QDesigner and invisible at run-time

    Thank you guys. That was almost it. I created a custom resource file for a dialog in QDesigner but forgot to include it in msvc project.

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.