Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved Some questions about build?

    General and Desktop
    build linux
    2
    2
    753
    Loading More Posts
    • 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.
    • JoeD
      JoeD last edited by

      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 Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • First post
          Last post