How to run a C++ code in Qt?
-
No, currently it shows two widgets: arwidget and pewidget.
MainWindow.ui is innocent here since you don't even show MainWindow.
If you only want to show one widget, create a QWidget, put a layout on it and add arwidget and pewidget to it. You don't even need MainWindow.
-
@SGaist
Hi, last week I created one widget and it worked. Today, I was goign to run it again, but the files format has changed. I think MSV was updated. First time MVS 2015 gave error "Severity Code Description Project File Line Suppression State Error Solution is not saved. Please save your solution before managing NuGet packages. 0".
Should I click on Restore NuGet Packages? -
I don't see why not.
Note that your link is pointing to an invalid page
-
@SGaist
The MVS 2015 was updated automatically and after that it and Qt are not working anymore.
First it gave error "...Please save your solution before managing NuGet packages". After that "the project file was unloaded". But when I tried other projects the error changed to "Failed to locate: "CL.exe. The system cannot find the file specified". I tried to install some components VS 2015: "Control Panel > Programs >Programs and Features > Microsoft Visual Studio > 'modify' > Visual C++ components and install", but it shows this window: here -
Did you try the first option in this window?
-
@jsulm
Yes, it worked and now MSVC 2015 is working, but not Qt. 5.5.
It gives error "Qt Creator needs a compiler set up to build. Configure a compiler in the kit options." in "Issues and in "Complie Output" the error "Configuration is faulty. Check the Issues view for details. Error while building/deploying project Circle2 (kit: Desktop Qt 5.5.1 MSVC2013 64bit) When executing step "Make". "I installed "standalone SDK" from here here Downloaded and a folder "Windows kits" was built in the same folder. I copied it in "Visual studio 14" folder, and run the Qt again, but this is Build & Run. No active "Desktop Qt5.5. MCVS 2013 64 bit".
I dont know what the problem is? The kit should be MCVs 2105?
-
I didn't realizeā¦ You changed Visual Studio's version in between. On Windows you can't mix and match compilers and libraries, Visual Studio's compilers are not compatible one with the other. So since you have the MSVC2013 Qt package, you have to use Visual Studio 2013 with it.
If you want to use Visual Studio 2015, you can either build Qt yourself, or go with the 5.6 beta which has VS2015 packages.
-
@SGaist said:
Thanks, which one do you recommend? I spent a lot of time on lunching and problem with running my programs until now because of components and compilers. If I uninstall 5.5 and install 6.5. beta, does Qt 6.5. work conveniently with Qt5.5. projects? -
You're too much in the future ;) It's 5.6
No problem using Qt 5.6 for project started with 5.5. Forward compatibility is one of Qt's guaranties.
-
Unusual, but why not just update ?
-
No, that's Qt Creator. It's the IDE.
IIRC, the 5.6 beta installer is available through your Qt Account page
-
There's also that link indeed. Since it's an offline installer, I don't remember whether it will overwrite the Qt folder or not
-
Don't put Qt in a path with white spaces, that will save you much trouble.
-
That's what I mean. Avoid white spaces it's the best thing to do on Windows.