Qt creator can't locate Qwt plugin - qt

I want to use the Qwt plugin in Qt Creator, but I have troubles installing it.
I work with Debian 10, Qwt 6.1.6, Qt Creator 4.8.2 and Qt 5.11.3.
I followed these instructions:
https://qwt.sourceforge.io/qwtinstall.html#qwtinstall-unix
These are the lines that I added to .bashrc:
QT_PLUGIN_PATH="/usr/local/qwt-6.1.6/plugins:$QT_PLUGIN_PATH" export QT_PLUGIN_PATH
I added this to my .pro file (this is a new project I started):
INCLUDEPATH += /usr/local/qwt-6.1.6/include
LIBS += -L/usr/local/qwt-6.1.6/lib -lqwt
CONFIG += qwt
However, I still don't see the new widgets in the UI form designer (after restarting Qt creator). I think Qt Creator hasn't located the Qwt plugin yet (although I am not sure).
I see some explanation about QWT_INSTALL_PLUGINS in the config.pri of the downloaded Qwt from sourceforge, but I am not sure how I should edit the .bashrc file.

Related

How to add the librealsense2 to Qt creator?

I'm pretty new with OpenCV & Intel Realsense device. I don't know how to add the librealsense2 to Qt creator. I searched many ways but they are not working for me.
I have no idea how to make it. So anybody has any hint??
First of all be sure about that you properly installed librealsense. You can check here to install.
After installation is done, you should add INCLUDEPATH and LIBS to .pro file. You didn't tell which operating system you are using. If its ubuntu, you can add simply like:
INCLUDEPATH += /usr/include/librealsense2
LIBS += -L$$DESTDIR/ -lrealsense2

Cannot find .pro file in Qt Creator

I'm new to Qt, learning through a Qt Creator tutorial. I am trying to connect Qt with a MySQL database. To do so, I have to modify a .pro file adding the command QT += core sql
However, once I create a project there is no .pro file in the menu, only the .ccp file.
Program installed: Qt Creator 4.13.0
OS: Windows 10 x64
Steps followed:
Choose New Project
Choose Qt Console Application
Build system: CMake
Kits: I have some available; I am using Qt 5.15.1 MSVC2019 64bit
The menu displayed shows a CMakesList.txt file, and the main.ccp source file. However no .pro file is created.
For new build system you should modify CMakeList.txt file.
Please try to replace
target_link_libraries(myapp Qt5::Gui)
with
target_link_libraries(myapp Qt5::Gui Qt5::Sql)

Build qt5.8 with desktop opengl option (ubuntu)

I built the sources of Qt5.8 with the option ./configure -opengl desktop
Then, I did a make and finally sudo make install. Now I changed the .profile file as pointed here: http://doc.qt.io/qt-5/linux-building.html
But I have a question: How can I start now qt creator ide?
It seems you're looking for qt creator, which isn't bundled in the qt sources and must be compiled separately, however if you want qt creator alongside with your new qt build, download the qt creator alone and install it, after that open the qt creator, go to Settings -> Build & Run -> Qt Versions , from there you can add new qt versions, just point to qmake which is located in your new qt installation (Probably /usr/local/qt5/bin/qmake) , now add a new kit via Kit's tab and then you can use your newly installed qt with qt creator.

How to install plugins into Qt Designer?

I have scoured the internet for information regarding the installation process for plugins into Qt Designer and I have found no helpful/relevant information.
The plugin I want to install is the echo plugin.
I have also looked through the Qt Designer program files and found the echoplugin folder but have no idea how to install it. Here is the file location:
C:\Qt\Examples\Qt-5.5\widgets\tools\echoplugin
This holds the following file types; Qt Project Files, C++ Header, C++ Source and JSON
System Information
Windows 10
PyQt4
Qt Designer 5.5.0
Official documentation describes it very well.
To install plugin for Qt Designer or Qt Creator you need to place the plugin to plugins\designer directory.
For Qt Creator it is located in it's bin directory.
Qt Designer is a part of Qt installation so directory will be QTDIR\plugins\designer where QTDIR is Qt installation path (for me it is "E:\DEV\Qt\5.5\msvc2015_desktop_shared" and full plugins path is "E:\DEV\Qt\5.5\msvc2015_desktop_shared\plugins\designer").
One important thing - Qt Designer / Qt Creator and the plugin must be compiled using the same compiler version. You can not install plugin compiled with MSVC 2015 to Qt Designer compiled with MSVC 2013!
Edit:
I am using C++ version of Qt.
It looks like echo plugin is not a plugin for Qt Designer / Qt Creator.

I cannot integrate Qt and VTK

I am trying to integrate VTK and Qt but unfortunately for some reasons I cannot. Currently, I can run VTK's examples except those using Qt's user interface. For example, examples in tutorial work but examples in infovis cannot be run.
I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. All parts were done successfully except :
cmake -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake \
-DVTK_Group_Qt:BOOL=ON \
-DBUILD_SHARED_LIBRARIES:BOOL=ON \
/path/to/VTK
when I was in VTK-build directory, it said that there was no path/to/VTK. So, I changed to VTK and removed /path/to/VTK and it worked.
Whenever I tried to build an aforementioned example, Qt says :
cannot find -lQVTK
error: cannot find -lvtkRendering ....
I really appreciate any help you can provide.
If you have installed the VTK in a folder named, say, "VTK-install", then check if you have QVTK.lib in the VTK-install/lib/vtk-5.10/ folder. (your vtk version will be different though).
In the Qt Creator, you have to edit the pro file. This is what you have to add to the end of the pro file created in Qt creator.
INCLUDEPATH += C:\\VTK\\VTK-install\\include\\vtk-5.10
LIBS += -LC:\\VTK\\VTK-install\\lib\\vtk-5.10
LIBS += -lvtkCommon\
-lvtksys\
-lQVTK\
-lvtkViews\
-lvtkWidgets\
-lvtkInfovis\
-lvtkRendering\
-lvtkGraphics\
-lvtkImaging\
-lvtkIO\
-lvtkFiltering\
-lvtklibxml2\
-lvtkDICOMParser\
-lvtkpng\
-lvtkpng\
-lvtktiff\
-lvtkzlib\
-lvtkjpeg\
-lvtkalglib\
-lvtkexpat\
-lvtkverdict\
-lvtkmetaio\
-lvtkNetCDF\
-lvtksqlite\
-lvtkexoIIc\
-lvtkftgl\
-lvtkfreetype\
-lvtkHybrid\
And run it in release mode. This should work fine.
If this doesn't work, make sure you have installed Qt and VTK correctly. You can check out this tutorial on how you should install Qt with VTK in MS Visual Studio 2010.
Install Qt with VTK
Of course, after this you got to install Qt creator which is better than Visual Studio to work with Qt.

Resources