Qt World Summit: Submit your Presentation

Running sample localstorage

  • I am trying to run the [localstorage]!(http://doc.qt.io/qt-5/qtquick-localstorage-example.html) example. I noticed there are 2 .pro files on in the /localstorage and one in the localstorage/localstorage folder. The first was created with theproject, but how can I create the second one ( I couldn't find an option for this in the New File/Project.
    Thank you for your help.

  • I'm sorry, what exactly are you talking about?

    What do you mean by "option in the New File/Project", is this a menu in the Qt Creator?

    Shouldn't building the first .pro file build the second one? Nevertheless, actually the second one it the real .pro file as you can see, if you open it (Template=app, header files, source files ...).

    So if it's just about building, it's probably enough to build the second .pro file
    $ cd /path/to/Directory/of/second/pro/File
    $ qmake
    $ make

  • I guess, I now have an idea what your problem is ... you cannot create the second .pro file in Qt Creator, because you didn't find a template for this in the menu?

    I thought you talked about building the example.

    Well, a .pro file is nothing special ... it's just a file with .pro in the end.
    So in the Template Dialog in the File Section go under general and select empty file. Just type in "name.pro" :)

    Hope I understand you correctly

  • @Leon_2001 Hi,
    You understood me correctly.
    After I added the second pro file all the files disappeared from Qt Creator Project view (they are still in the folder when I check with Windows Explorer. How can I add the files back to the project?
    Thank you.

Log in to reply