Qt installation - c++

I am completely confused in installing Qt.
Do I need to download both Qt creator and Qt SDK or Qt.exe?
I have Visual Studio 2010 and Code::Blocksin my PC. So, how can I link if any one of the Qt XXXX listed above with VS-2010 or with Code::Blocks?
Please help

You can download QT creator from http://qt-project.org/downloads for windows you will get a .exe (you will find different .exe for VS Studio and mingw, so you can use what you prefer), once you install it you got
Qt libraries, prebuilt for a particular development platform (operating system
and compiler)
Qt Creator integrated development environment (IDE)
Basic development tools, prebuilt for a particular development platform
Documentation
Some more help.
You can start Qt Creator directly after the installation by selecting the option
on the last page of the installation program. You can start most of
the development tools, such as GUI designers, compilers, and debuggers
directly from Qt Creator. You can also access the installed documentation and
example applications from Qt Creator.
You can open most example applications in the Qt Creator Welcome mode to build
and run them. Additional examples can be opened by browsing
(install_dir)/(version)/(compiler)/examples.
To develop a Qt application, you need to set up a project. Qt Creator contains
wizards that guide you step-by-step through the project creation process. The
wizards prompt you to enter the settings needed for a particular type of project
and create the necessary files for you. To start, select File > New File or
Project.
The wizards create projects that use the Qt build tool, qmake. It is a
cross-platform system for build automation that helps simplify the build process
for development projects across different platforms. You can modify the build
and run settings for qmake projects in the Qt Creator Projects mode.
Qt Creator provides support for building, running, and deploying Qt applications
for different target platforms, or using different compilers, debuggers, or
Qt versions. Kits define the tools, device type and other settings to use when
building and running your project.
The Qt installation program adds the installed Qt version
((install_dir)/(version)/(compiler)/bin/qmake) to Qt Creator and creates a kit
that specifies the installed Qt version and compiler. To use the kit, add it for
your project in the Qt Creator Projects mode. Then select the kit in the Kit
selector before you build or run the project.
To compile C++ Qt applications by some other means, add
(install_dir)/(version)/(compiler)/include to your build tool's search path
for include files, and (install_dir)/(version)/(compiler)/lib to the search
path for libraries.

To work with Visual Studio 2010, you can download the installer "Qt 5.0.1 for Windows 32-bit (VS 2010, 481 MB)", or just download the source code and build it yourself (you'll need to do that if you want 64-bit versions of the libraries).
"Qt Creator" is Qt's IDE, so you don't need that. You just need the "Qt Library" to use Qt with other IDEs. For Visual Studio, you'll also want to download the "Visual Studio Add-in," which allows you to view Qt data structures in the debugger.
The free downloads are available at qt-project. Commercial downloads are on digia.

Related

Building QT with Visual Studio

I know there have been a few questions before regarding this, but not too much up to date.
I am developing a project with Visual Studio 2015 express edition and I wish to add a GUI to my project via QT.
The latest version of QT (5.8.0) has a VS 2015 version, so I assume it is compiled using Visual Studio instead of MinGw.
Sorry if this is a very noob question. I have no experience with QT, but how do I then integrate my QT project into my VS project, do I build the GUI code first in QT?
If I will create a GUI using the .ui file in QT and then generate the source code for this, can I just copy the source code to my VS Project. I assume I have to configure the project file in VS as how will VS know where to find the dlls and header files for QT? Thanks in advance
You need the VS Tools for Qt. They work with >= Visual Studio 2013 Community Edition.
You can get them here and all information about how to use them.
Qt VS Tools integrate the Qt development tools into Microsoft Visual Studio 2013, and later. This enables developers to use the standard Windows development environment without having to worry about Qt-related build steps or tools.
The main features of Qt VS Tools are:
Wizards for creating new Qt projects and classes.
Automated build setup for the Meta-Object Compiler (moc), User Interface Compiler (uic), and Resource Compiler (rcc).
Import and export of Qt project files (.pro) and project include files (.pri).
*Automated conversion of a Qt VS Tools project to a qmake project, or the other way around.
Integrated Qt resource management.
Integrated Qt documentation.
Debugging extensions for Qt data types.

Which Qt to download?

I am new to C++ and have been working with MS VISUAL STUDIO 2010 Express. However, I am in need to shift to Qt as my university recommends. Unfortunately, the qt.nokia.com is redirecting to another site http://qt.digia.com/.
Since everything in that site is not free, I found the following link called "Qt Open Source Version". Is this is the site to download Qt?
When I go there, I can see various options, which means number of downloads. I have windows 7 ultimate and got visual studio 2010 express installed in my machine. But, this site got number of windows downloads. I prefer the one which claims to come with the Qt IDE (Qt Creator??). If you need further more information, I will be using this Qt GUI C++ applications with OpenCV.
I have already installed OpenCV and it works with VS so if you can, please tell me how to set it up with Qt as well.
Please help me to download the correct version of Qt. Thanks
Answering to these kind of question is always hard and dangerous!
I know you had experiences with VS but
I'm going to offer you to choose MinGW instead.
Download link
qt-project is the correct place to get open source Qt.
There are prebuilt binaries of Qt 5.0 for VS2012, but if you want to use Qt 4.8 with VS2012 you'll need to compile it yourself, as there are no prebuilt binaries for VS2012 (yet?). Compiling Qt is not difficult, just open command prompt for VS2012, run configure --help to find out how you can customize your Qt build. Then run configure with appropriate parameters, then nmake.
If you decide to use Qt Creator as an IDE you are welcome to do it - Qt Creator can compile projects using different compilers, including VS2012 compiler. But in order to debug projects compiled with VS2012 compiler you'll either need to use VS2012 or install Debugging Tools for Windows (which Qt Creator will find and use to debug VS2012-generated executables).
http://qt-project.org/downloads
Qt 5.0
Select the file according to your operating system from the list below to get the latest Qt 5.0 for your computer. The binary packages include Qt 5.0.2 libraries and Qt Creator 2.7.0
Qt 5.0.2 for Windows 32-bit (VS 2010, 485 MB)

How to use Qt Creator with Visual C++ compiler on windows?

I installed Visual Studio 2008, Qt 4.8 libraries for vs2008 and Qt add in. I can build Qt projects in VS2008. But it's very inconvenient for me. When I open Qt project in Qt creator it can't compile because can't find qmake.
So, how to build projects using Qt Creator on windows.
Use CMake to build your software. With CMake you can:
-Build your project on a continuous integration server
Compile with different compilers (Microsoft, gcc, clang) to get additional static checking.
Open the top level CMakeLists.txt with creator as a project file.
Have CMake create Visual Studio project files.
If you want to fix Creator only:
Qt Creator needs to know where your Qt installation is. Choose the green Qt symbol in the settings menu, klick Qt Version and enter the path to qmake. Then Qt Creator should be ready to go.
hope this will help its having easy steps with some solution of errors that one may encounter during installation http://qtitkvtkhelp.blogspot.in/2012/11/qt-installation-prerequisite-1.html

installing Qt for VS2010

after finding that its too hard to write GUI applications with WIN32API today im going to learn Qt. so I installed qt as follows.
first I installed VS 2010 express. its OK.
then downloaded Qt libraries 4.8.3 for Windows (VS 2010, 235 MB) from http://qt-project.org/downloads and installed it as a normal software. (in C:\Qt\4.8.3) it automatically installed assistant, designer ... ect.
then downloaded Qt Creator 2.6.0 for Windows (51 MB) from http://qt-project.org/downloads and installed it also as a normal program.
now in qt creater when I try to creat a Qt project it says that no valide kits found.
here are some screenshots of the issue im facing.
what should I do now to start qt. please I need someones help to procced.
You don't need QtCreator AND visual studio.
QtCreator is Qt's own IDE and uses g++/mingw as the compiler (included in the download).
Qt includes QtDesigner - the graphical UI designer that you can use with visual studio or QtCreator.
If you want to use VS, install the qt-vs-addin and download the VS builds of the Qt libs.
If you want to use QtCreator, download the mingw builds of Qt.
Or in both cases you can download the source and build it from scratch using wither QtCreator or VS.
edit: You can make QtCreator use the VS compiler backend - in which case you should download the VS build of Qt. Personally I have never done this - if you are using VS then you may as well use the VS ide.
edit2: The free express version of VS can't use plugins - so its a bit of pain to use with Qt. In this case you should probably use QtCreator.

Qt Creator with Visual C++ 11

I want to use Qt Creator with MS VC++ 11 but it says there is no toolchain to build Qt.
I installed Qt with the full SDK installer.
What to do now?
Isn't MSVC++ 11 comes with Visual Studio 11? If so then Qt hasn't supported makespec file for that version AFAIK (correct me if I am wrong). But following are the (rough) steps for running Qt Creator with MSVC 2010 nmake/cl tool-chain..
Download Qt SDK 4.8.2 compiled using msvc-2010 toolchain from this site (second page).
Install MS VC++ 2010 free development tools (or full SDK), which comprises of nmake/cl/cdb executables.
Restart PC so as to initialize environment variable and all.
Start Qt Creator, by now you will notice msvc-2010 tool-chain has been identified by Qt Creator (Tools -> Options Dialog). If not then manually add it.
Also confirm that Qt version 4.8.2 of msvc-2010 has been identified in Qt Versions tab. If not then manually add it by giving path of qmake in bin of Qt SDK folder. It will also select msvc-2010 tool-chain automatically.
Here you go, now go to Projects and in Build Settings, select msvc-2010 tool-chain and compile. Make sure win32-msvc2010 is selected as makespec file.
Hope this helps.
try building using the makespec of Visual Studio 2010.
SET QMAKESPEC=win32-msvc2010
before running configure and qmake should do the job