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. Some questions about build?

Some questions about build?

Scheduled Pinned Locked Moved Unsolved General and Desktop
buildlinux
2 Posts 2 Posters 882 Views
  • 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.
  • JoeDJ Offline
    JoeDJ Offline
    JoeD
    wrote on last edited by
    #1

    Hi,
    I have a qt project that i am developing in ArchLinux.

    In my project, there are text file and sqlite database file as well.

    To use this program, i am inserting some sentences into my txt file and i am adding these sentences into database according to my process.

    For example; I am editing txt file outside the program by using text editor. Then I am running program to process these sentences. But when I build my project, there are object output files.

    Here is the question.
    What if I publish this program public, how can i edit that txt file? Is it stupid thing to put that file into same directory with qt project?

    How can i deal with this situation?

    Thanks..

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      If you publish your app then you should use standard directories for documents/configuration (and NOT the directory where your app or Qt is installed!).
      Should the user be able to edit that text file?
      Does this file contain some predefined content?
      If it does your app could generate this file if it is not there and write this predefined content into the file.
      If user should be able to edit the file directly then you should store the file somewhere in its home directory ("My Documents" on Windows /home/USENAME on Linux). Else you can treat the file like a configuration file.
      See here how to get paths to standard directories: http://doc.qt.io/qt-5/qstandardpaths.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      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