how to configure code::blocks to work with Qt? - c++

i want to know how how to configure code::blocks to work with qt to create QT Applications..
i have installed the latest version of QT that is 5.3.2 and i have QT creator ( but don't want to use it) . can someone explain the Code::Blocks Settings for Qt Development ? or what the directories and libraries should i add tho the project ??
i tried this way but i didn't find the directories in the article.

Related

Setting Up Qt 5

I downloaded and installed the community version of Qt 5.10 and Qt Creator for a C++ project I'm working on. I'm just wondering if I did something wrong during the installation because in my options, there is no cmake file, or any debuggers. Or am I supposed to set these up myself?

Empty project creating by QT Creator + cmake doesn't work

I create empty C++ project in QT Creator using cmake. After some menus where I choose "cmake" as a building tool I see a project hierarchy:
- MyTestCMake2
- CMakeLists.txt
(New Project -> Non-Qt Project -> Plain C++ Application -> checked CMake for building system)
And that's all! It's strange but QTCreator opens main.cpp with some C++ code but QTCreator tells me that this file does not a part of my project. I try to add main.cpp manually to MyTestCMake2 project but I can't do it. It's disabled.
CMakeLists.txt content is:
cmake_minimum_required(VERSION 2.8)
project(MyTestCMake2)
add_executable(${PROJECT_NAME} "main.cpp")
I try to run cmake with: Build -> Run CMake but nothing happens. What's wrong? Why QTCreator doesn't work with CMake properly?
My env is:
cmake: 3.9.1
Qt Creator: 4.3.1 (Qt: 5.9.1)
Mac OS Sierra 10.12.5
SOLVED
I've upgraded Qt Creator to 4.4 and it worked out of the box! I did the same steps as before but now it works without any problems! What a magic.
I've upgraded Qt Creator to 4.4 and it worked out of the box! I did the same steps as before but now it works without any problems! What a magic.
Sometimes the mixed QT 5.x installation breaks the kits. Several kits starts to show a warning in the kit popup message balloon (Tools->Options->Kits->Kits: Auto-detected/Manual) about unsupported generator cmake server mode (cmake -E command line option).
Seems only behind the cmake server mode the Qt Creator can properly build the Projects pane.
The only way I could get it fixed is complete QT uninstall before install. Even the last QT 5.x minor version can break the kits (5.12.12 at the moment).

Can't create console application project in QT creator - No valid kits found

I already add a kit in Tool->Options->Kits->ADD
and when im trying to create a console application it says "No valid kits found"
Click the Option hyperlink (or Tools --> Options) in the Kits tab, select the Desktop (default) entry below the Manual. You will see that the Qt version is blank, click the input control and select the right qt version and Apply or OK.
QtCreator did not find and tool chains.
Use the Qt Online Installer for Windows to install MinGW or MSVC tool chains.
If your qt sdk is x64 you need to install x64 mingw compiler. If not than install i686 mingw for compiler. Here is good guideline which you can learn how to install qt creator, qt sdk, and mingw for w8.1 machines.

Install VTK 6.2.0 with Qt 5.4 using CMake-GUI 3.2.2

This is the first time I try to use Vtk libraries but I can not find a tutorial that can help me with the qt integration. I tried several tutorials but when I try to write some code, qt can not find vtk libraries.
I followed this post but something doesn't work correctly: Combining Qt 5.4.1 with vtk 6.2.0 (using CMake GUI 3.2.1) on windows
Can someone explain me the correct procedure? I'm using Windows 7 64 bit, VTK 6.2.0, QT 5.4 and CMake-GUI 3.2.2.
Thanks to all who respond!
Did you build the vtk solution in debug or release? In the example you linked (it was me), I did it in debug, so it will only work in debug (until I build it in release)
also, maybe it's your cMakeList the problem. Did you manage to launch the project EasyView from the vtk solution?
Finally, the tutorial I followed was this one : http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup
The only thing I had to modify, was to change the qt version to 5, add another entry cmake_prefix and set up several environment variables.
Try to create Qt project with cmake instead of qmake like is described here
For a first step try to write just hello world in Qt and try to create cmake for it..
Then you just add the VTK find functions and use those to add vtk support to your qt cmake project. Maybe its something like this (never used vtk):
FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})
Then you should be able to use Qt and vtk in same project..

Qt with Eclipse CDT Juno

I am having a difficult time trying to find a way to link the Qt library to my Eclipse project.
The Qt SDK package 4.8.1
with
Eclipse CDT Juno
Is there a way to link Qt libraries to eclipse?
UPDATE: It appears that the Eclipse plugin is no longer officially supported but that it's still available via download. The link below references their ftp site.
Nokia provides Eclipse-Qt integration. That said, it's unnecessary as it's always possible to use an Eclipse project that's using custom build commands. You could simply create a makefile project making certain to run qmake at the appropriate times.
To start, it might be as simple as:
Create a file or two
qmake -project # create your project file
qmake # generate your makefile
# tell eclipse to build the project
If the above, you'd only need to re-run qmake when adding new files and doing other things that affect the qt project file.
#enobayram
Yes it does.
The Qt integration pack is 32bit and therefore all depencies like Eclipse / Java / Qt must be also 32bit.