Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I add a txt/json file to QtCreator project view?
Forum Updated to NodeBB v4.3 + New Features

How can I add a txt/json file to QtCreator project view?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 832 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Curtwagner1984
    wrote on 3 May 2022, 04:44 last edited by
    #1

    Hello,
    I have a configuration txt file at the root of my project, I want to be able to see it and modify it from Qt creator, but it seems the project view ignores all non c++ and pro files.

    Is it possible to add this file to the project view? I read about making a resource file and adding it there, but this is done to expose the file as a resource to the code. I don't need that. My project only uses this file on build time.

    J 1 Reply Last reply 3 May 2022, 06:08
    0
    • C Curtwagner1984
      3 May 2022, 04:44

      Hello,
      I have a configuration txt file at the root of my project, I want to be able to see it and modify it from Qt creator, but it seems the project view ignores all non c++ and pro files.

      Is it possible to add this file to the project view? I read about making a resource file and adding it there, but this is done to expose the file as a resource to the code. I don't need that. My project only uses this file on build time.

      J Online
      J Online
      J.Hilk
      Moderators
      wrote on 3 May 2022, 06:08 last edited by
      #2

      @Curtwagner1984 are you using qmake or cmake ?

      anyway, qmake its

      //in pro file:
      DISTFILES += myotherfile.txt
      

      cmake, I don't know 😅


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3
      • C Offline
        C Offline
        Curtwagner1984
        wrote on 1 Jun 2022, 06:10 last edited by
        #3

        Thank you!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved