Integrating ros to an existing qt application - qt

I have a QML, OpenCV application on qt5 which uses qmake and has a .pro file. I want to add publishers/subscribers to my qt project to publish video stream and instructions etc. I tried to use catkin_create_qt_pkg command to create a template and transfer my project to the template but there were numerous problems which made me question my approach. The ros-qt template uses Cmakelist and .ui instead of qml. So, I will need to change some things to integrate them.
First, is it possible to use ros with qmake and .pro instead of cmake. It would be easier to add just ros publishers and listeners to my existing application than changing the entire QML application. If not, how do I convert qmake and .pro to cmake and Cmakelist.txt (assuming that I can use QML with ros). Also, although it doesn't sound well, is it possible to use .pro for qt and Cmakelist.txt for ros in the same package?
Second, is it safe to use qt5 and qml with ros? The ros_qt app template uses qt4, not qt5. Here is the app template.

Related

How to use qt creator for non qt, non cmake project?

I want to use qt creator for modifying a project that just uses makefiles. How i can do it? Right now i can just open project files one by one and there is no auto code completion or other advantages of ide. My main concern is use the ide over ssh actually.
I tried open all folder but it didnt work too.
You can use Qt Creator for non-Qt projects, but it will always assume you want to use qmake, CMake, or QBS as your build system. It's not going to read your plain Makefiles and recognize what source files you are using.
In the New Project wizard, you can select non-Qt application. I recommend selecting qmake as your build system, which will create a .pro file, even if you won't end up using it. Then after it creates the project, go into your Project settings under Build Steps. You can delete the built-in steps and add your own custom build steps to do whatever you want. Call make or whatever. Do the same for the Clean Steps.

Deployment QML app with minimum Qt libraries

I have an app wirtten with C++ (just simple QML loader) and QML (all GUI and logics).
Now I want to create some package for deployment to other systems. Currently I need it only for Windows so I create a package with Inno Setup.
I packaged my exe file and couple of Qt libraries. To view what libraries I need I used Dependency Walker. But I was surprized that my app was linked with unused libraries:
Qt5Multimedia.dll
Qt5MultimediaWidgets.dll
Qt5Sensors.dll
Qt5Positioning.dll
Also I see these libraries in compiler output: -lQt5Positioning -lQt5Sensors ... etc.
But I don't use no multimedia no sensors no positioning at all!!
In .pro file I use that:
QT += qml quick sql widgets xml webkitwidgets
So my qustion - how can I compile my app without these superfluous libraries?

Convert project Qt to file .exe for window

Hello i'm a young develop on Qt. I want to know that can we convert project Qt (header, source, form, resource) to a file can run without Qt Creator? And how can we convert it to a file executable on window (.exe)?
The compiler is responsible for making an executable out of the source code. This has nothing to do with Qt.
When you start a program from the QtCreator an executable file is built by the compiler, then started. Have a look in your project folder to find that .exe file.
You dont have to do anything special. Each Qt project has a .pro file that is used for compiling. You need to use qmake on the command line with the .pro file as input. This will generate a makefile that you can then give to nmake.exe (if using Visual Studio compilers) or mingw-make (if you are uisng mingw compilers) to build. These steps will compile your source code into the .exe. Look through documentation of qmake to know more. Qt Creator also does the same steps and you can check out the buildlog in Qt Creator to see it working.
Yes, the exe file that you compile with Qt Creator or alternatively some other IDE or compiler is technically all you need to run the project from there on, except you need to have the linked Qt libraries somehow available to the executable. This is especially important if you plan to run it on a machine different from the one you developed it on. See the Qt documentation on Deploying Qt Applications for other details you may need to consider in that case.

Creating a Win32 Application in Qt Creator

I'm looking to create a win32 application in Qt Creator - is this possible? If so, how would I go about doing it? My preference would definitely be to use native C code (and the native API) if possible.
Yes, you can use Qt Creator just as an IDE. It doesn't force you to use Qt or C++ only.
Create project for Qt Console Application
From .pro file remove "QT += core"
From main.cpp remove all Qt stuff
Include required WinAPI headers
Write C-code only
...
Profit
If you don't want to be tied to Qt at all, Qt Creator supports CMake. Create your CMakeLists.txt then open the file as a project in Qt Creator.

Create simple gui using qtdesigner

I want to create a gui, if it means implementing the code, where do I implement the code? And how to run the qtdesigener?
You can use Qt Designer, or Qt Creator which is a full developement environment (IDE) not just a GUI designer. Visit this site http://qt.nokia.com/products/developer-tools
Each window or widget in Qt generally is defined in 3 files:
some_name.ui - this file is generated by Qt Designer or Qt creator.
some_name.h - this is the C++ header file that contains Class declaration
some_name.cpp - this file contains C++ class implementation
some_name ofourse is the name of your widget/window.
When You add new windows/widgets to your Qt project you have to modify Your *.pro file which contains information on how to build your project.
The following tutorial shows a hello world in qt creator:
http://www.youtube.com/watch?v=QLT7oEt6gLE
I hope this is what you were looking for.

Categories

Resources