Results 1 to 2 of 2

Thread: Resources

  1. #1
    Join Date
    Jun 2019
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Question Resources

    Hello,
    I don know how to manage "Resources":
    <RCC>
    <qresource>
    <file>images/newyork.jpg</file>
    </qresource>
    </RCC>

    QImage image(":/imageViewer/images/newyork.jpg");
    ui->imageLabel->setPixmap(QPixmap::fromImage(image));

    why does not work?

    Thank you!!!

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    482
    Thanked 71 Times in 67 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Resources

    Because the path is wrong - imageViewer isn't somewhere in your resource file.

Similar Threads

  1. Is it possible to add QT resources to a DLL?
    By cboles in forum Qt Programming
    Replies: 4
    Last Post: 17th January 2017, 00:12
  2. MP3 file from Resources :-/
    By qtpat in forum Qt Programming
    Replies: 5
    Last Post: 26th March 2014, 16:34
  3. Shared resources
    By ^Nisok^ in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2009, 10:34
  4. Qt Learning resources
    By Saman in forum Newbie
    Replies: 8
    Last Post: 2nd May 2009, 03:58
  5. Qt Resources
    By kaushal_gaurav in forum Qt Programming
    Replies: 3
    Last Post: 3rd October 2008, 16:30

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.