QT in visual studio 2015



  • Hi Qt's

    I've followed a guide how to install qt add-in in visual studio 2015
    https://www.youtube.com/watch?v=nBHkeCVMJqM

    my problem is that i cannot open the desgner in visual studio, i get following error:

    No default Qt version found. Pleae check your Qt Visual Studio Add-in settings.

    your help is very much appreciated

    regards Chris


  • Moderators

    Hi, welcome to devnet.

    Well, have you tried to do what the message says? There's a combo in the add-in options that lets you choose a default version.



  • Thanks for the welcome! :)

    I've chosen the path to qtbase, and in the bottom it sais default qt/win version : 5.6.0 so i thought i had done that?
    regards


  • Moderators

    I'm guessing you built Qt 5.6 yourself. Did you build the designer too? Can you run it successfully from outside VS?



  • Sorry, i don't understand what you mean by if i build the qt 5.6 myself?
    I saw a similar post, which said that the qt alpha didn't work with the designer, so at the moment im reinstalling VS2015 and qt

    Regards.


  • Moderators

    @ChrisBM said:

    Sorry, i don't understand what you mean by if i build the qt 5.6 myself?

    I mean there are no official installable packages of that version yet, so to use it one needs to build it first from sources.

    so at the moment im reinstalling VS2015 and qt

    I doubt that's gonna change anything.



  • Oh I unfortunately created nearly identical thread. I'm so sorry
    We both using 5.6.0 alpha, and yes:

    I'm guessing you built Qt 5.6 yourself. Did you build the designer too? Can you run it successfully from outside VS?

    I built Qt 5.6 myself (but I heard that for 5.5.1 I have to do same because binaries are prepared only for Visual Studio 2013 and older right now, and I really hadn't wanted to wait any longer and have to work with 2015).
    I also hadn't build designer. How do I do that? Is it just typing configure and jom at another folder?


  • Moderators

    @marner said:

    I also hadn't build designer. How do I do that? Is it just typing configure and jom at another folder?

    Maybe you did but don't know it. It builds by default with the rest, unless you passed -nomake tools to the configure step. Just check the bin folder of your build and see if designer.exe is there.



  • All my *.exe files at C:\Qt\5.6.0\Qtbase\bin directory are:

    • 14.11.2015 22:22 1 208 320 moc.exe
    • 14.11.2015 23:24 1 094 144 qdoc.exe
    • 14.11.2015 22:32 108 544 qlalr.exe
    • 14.11.2015 22:11 2 295 808 qmake.exe
    • 14.11.2015 22:22 995 840 rcc.exe
    • 14.11.2015 22:58 363 520 uic.exe
      I hadn't use any flags at configure so I have no idea what went wrong.
      I have tools catalog at C:\Qt\5.6.0\Qtbase in have 2 catalogs inside "configure" and "shared".

  • Moderators

    If you only built qtbase directory like the video does, then you don't have any of twenty-something additional modules, including qttools, which contains the designer, assistant, linguist and several other tools. That's not very useful build. That's probably also the reason why the add-in doesn't recognize the default Qt version set.

    Btw. The video suggests horrible things like editing your global environment variables. I would strongly advise you against following it.



  • Soo... to make it work I just have to build whole 5.6.0 directory instead of shown on video Qtbase?
    (I'm going to try even without answer, but tomorrow. It's midnight right now in Poland)
    Of course I had changed my global environment variables back after build, and I'd do it again.


  • Moderators

    You don't have to build everything but if you want to use tools you need to build qttools at least.



  • I am facing identical issue with Qt 5.6.0 beta

    I did not compile myself, rather I used installer from official Qt website. I have set up correctly Qt Settings in Visual Studio 2015 Community and selected default Qt version (5.6.0 win64 msvc2015)

    The folder conatins bin folder with qmake and everything. Building apps in Qt Creator works. However, when I try to launch Qt using VS addin 1.2.5.9 I get error

    No default Qt version found. Pleae check your Qt Visual Studio Add-in settings.

    How to fix this? Create new Qt project fails as well.


  • Moderators

    Did you do what is suggested in the error message: "Pleae check your Qt Visual Studio Add-in settings"



  • @jsulm Yes, but there is no other settings than QT5 -> Qt options and in there the only thing I can change is location of qt files on system. This I have set up correctly. Is there any other settings I should check? I have not found any. Thx


  • Moderators

    You have to create a Kit. A Kit defines which compiler and Qt to use. I never used Qt with VS, so I don't know where Kits are defined in VS-Qt plug-in.


  • Moderators

    @jsulm Kits are configuration unit of Qt Creator. There are no kits in VS.

    @michnovka You said you used an installer and that you set as default Qt 5.6.0. there is no official installer for Qt 5.6.0 as it hasn't been released yet.

    To whomever compiled Qt from the zipped package. I'm not sure what's the status now so this info might be a little out of date but I remember there were multiple problems with compiling zipped packages in the past. The preferred way to get the sources is via online installer or directly from git.

    Here's the process I'm using for a couple of years now, the last time with VS2015 and Qt 5.5.1:

    • download and install VS2015 Community ( lets say it installs to <VS-Dir> )
    • download and install Python 2.7 (let's say to <Python-Dir>), note that Python 3 didn't work in the past, didn't check lately
    • download and run the online installer, select only the Src component of Qt 5.5.1 ( lets say it installs to some <Qt-Src> )
    • create some directory for build artifacts, let's say <Qt-Build>
    • create directory for the final Qt location, let's say <Qt-Install>
    • open command line (cmd.exe)
    • run <VS-Dir>\VC\vcvarsall.bat amd64, this sets up VS for a 64bit build in the local environment
    • SET PATH=%PATH%;<Python-Dir>, this adds python to the local environment
    • cd <Qt-Build>, switch to build directory
    • <Qt-Src>\configure -prefix <Qt-Install> -debug-and-release -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -skip webkit -skip webkit-examples, adjust this to your liking, make sure you pass the prefix option, it helps to crete a clean build
    • nmake or jom, whichever you like
    • nmake install, copies the libs, exes and includes to the prefix location, lean and clean
    • delete the <Qt-Build> directory (saves tons of space)

    This build can be added to the unofficial Qt5Package extension in VS2015 and works fine. I'm successfully using it right now.



  • @Chris-Kawa thanks for your reply. I used this site to get installer and it looked exactly as official Qt 5.5 installer.


  • Moderators

    @michnovka It is the Qt's download site but notice the link points to the snapshots directory and not even the latest. If you go to top level there's an "official_releases" section which currently contains versions up to 5.5.1.
    While 5.6.0 is still in pre-beta I'm not saying it will not work. It might and it might not. Also remember that the Qt5Package extension for VS2015 is not made by Qt Company, so it might not support the latest betas. You might actually get a better help by asking the author of it.


Log in to reply
 

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