Important: Please read the Qt Code of Conduct -

Create a Desktop GUI application without UWP?

  • I'm returning to C++/Qt development after being away for several years. I created a new GUI application project using the Visual Studio Add-In, leaving me with a "Universal Windows" application. In this application, I'd like to allow the user to select a set of image files which are then displayed (as thumbnails) on the GUI. (Using Windows 10 as my OS.)

    This works fine as long as the image files are in the application directory, but it does not work if the files are located elsewhere on the user's hard drive. (I assume this is due to the new security features baked into Universal Windows.) I don't want to live with these UWP restrictions of files-can-only-be-in-certain-locations, so I'm looking for a way around this. So, can I either 1) create the Qt/GUI application without the UWP dependency or 2) programmatically set directories to allow read/write access?

    I've tried option 1, starting from a blank project and adding in the necessary Qt pre-processor definitions, include directories, library dependencies, etc. but when I try to run the application, I get an error message saying that VCRUNTIME140_APP.dll was not found and I think this indicates that my underlying Qt libraries are requiring UWP.

    And option 2, doesn't seem to be easily available in un-managed C++.

    So, can anyone shed any light on this for me or provide any suggestions?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What exact version of Qt did you install ?

  • @SGaist 5.11.2 (winrt_x64_msvc2017)

  • Lifetime Qt Champion

    Then why not use the classic desktop version ?

  • @SGaist I'd love to, but I'm not sure how to select/find it. Do I need to add another QtVersion from the QtOptions dialog? I only see the following options: android_armv7, android_x86, Src, winrt_armv7_msvc2015, winrt_armv7_msvc2017, winrt_x64_msvc2015, winrt_x64_msvc2017, winrt_x86_msvc2015, winrt_x86_msvc2017.

    Hah, the desktop version is available in 5.11.1, but not in 5.11.2. I'll give that a try...

  • Lifetime Qt Champion

    Which version of the installer are you using ?
    You can also use the MaintenanceTool to add/remove Qt versions.

  • @SGaist I used (qt-unified-windows-x86-3.0.5-online) to install Qt. For some reason, the installer didn't give me desktop versions of 5.11.2. I just tried the desktop version of 5.11.1 and it is doing exactly what I want it to do.

    I appreciate your help, just wish I hadn't spent so much time with the 5.11.2 UWP version!

  • Lifetime Qt Champion

    That's strange, you should have them all...

    In any case, your code is still usable so it's not completely wasted time :)

Log in to reply