Project with local database - where to put them?



  • Hello, I remind everyone that I still feel like a junior in the development with the C ++ and QT language.
    If the project works with one or more databases, where is it better to place them?

    I ask because:

    1. the project folder is in one position
    2. When you create the executable, you are in another position
    3. Although I work on Windows, maybe the program must also be run on Linux

    I thought about creating a folder within the project
    Do I create a folder in the root root of the disk?

    Is there a correct method to make sure you can recall the database in its position?


  • Lifetime Qt Champion

    Hi,

    Take a look at QStandardPaths. It’s the class that allows you to get the correct paths on all platforms.



  • Very Well, thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.