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 7006323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:27:47+00:00 2026-05-27T21:27:47+00:00

when working with Qt Creator and developing my project, I’ve added to a resource

  • 0

when working with Qt Creator and developing my project, I’ve added to a resource file my txt file which contains some information. I thought that this file will be incorporated into exe file and I won’t have to supply this file with my exe file. Now I’m running this exe file of my project and I’m getting info that the txt file couldn’t be found (although everything works perfectly when run via Qt creator). Is there any way to make it work as so I don’t have to provide this txt file with my program?
EDIT:
Resource file:

<RCC>
    <qresource prefix="/settings">
        <file>Resources/setting_files/accepted_file_extensions.txt</file>
    </qresource>
</RCC>

And I’m accessing it:

boost::filesystem3::ifstream fin("./Resources/setting_files/accepted_file_extensions.txt");
  • 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-27T21:27:47+00:00Added an answer on May 27, 2026 at 9:27 pm

    It works when you run in Qt Creator because the working directory is where you have your Resources folder. That Boost ifstream does not read the resource from your exe but the real file on the disk. Boost has no idea about Qt resources (nor should it). Instead, use QResource to read the resource data from your exe or use QFile to read it as if it was a file (by prefixing the path with :).

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

Sidebar

Related Questions

I have a project I'm working on in Qt creator that requires a third-party
I am working with QT Creator. I have a form that contains a push
Informative I'm working on a project that loads a binary file from the disk.
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project that parses a log of events, and then updates a
Working with python interactively, it's sometimes necessary to display a result which is some
I am working on a project in qt Creator and I would like to
I am working on a Google app engine project where I have saved some
I want to work with Asterisk and develop some Programs for working with that.
I've been working on a project that requires draft/live versions of content and have

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.