Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6681495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:35:48+00:00 2026-05-26T04:35:48+00:00

Qt Creator give the possibility to attach some resource to the project. I created

  • 0

Qt Creator give the possibility to attach some resource to the project.
I created in the project directory a folder called: Images. inside i have the file splash1.jpg

I created then the Resources file and attached the file as shown in the following figure:
enter image description here

Which is now the correct way to access from code such a file?
I tryed

QPixmap pixmap( "Images/splash1.jpg" );
QPixmap pixmap( "./Images/splash1.jpg" );

but none of them worked.

if i put just ./Images/splash1.jpg work at least if i compile by hand with qmake and make because has the correct path at runtime but no way to make it work within qt creator

Any idea??

Cheers,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:35:49+00:00Added an answer on May 26, 2026 at 4:35 am

    Qt5 resources explains all you need. You have to put the colon before the path in the source tree. You also have placed a prefix, so :/Images/Images/splash1.jpg. This will give you a path.
    If you need a URL, then use the qrc: scheme.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a QDialog based app using Qt Creator and all is well
when working with Qt Creator and developing my project, I've added to a resource
I am using Qt Creator and have a Qt GUI project that depends on
People create their own websites using WYSIWYG creator i give them. These websites have
i have created a workflow activity that do give the item creater of a
I have Qt Creator on my mac. I downloaded the Qt sdk sources, I
I am working with QT Creator. I have a form that contains a push
I'm trying to import some working Visual C++ code into Qt Creator and I'm
I am trying to print (to a text file) the fragmentation information give by
Qt creator has option to promote one widget to customly created class that derives

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.