Project

General

Profile

Actions

Support #5432

closed

How to include Qt5 Library (QtCore QtGui QtWidgets QtDeclarative) into a Cmake

Added by Juan Pablo Zuluaga over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/21/2016
Due date:
% Done:

0%

Estimated time:

Description

Hello,

I was Checking the CMakeList.txt from the widgetgallery example , I Would like to include de Qt5 Library (QtCore QtGui QtWidgets QtDeclarative) into this Cmake , all this to get the chance to implement some functions available in the Qt5 Libraries like QProcess() or any other. How to do that ?

I get an error like this:

error: undefined reference to `QProcess::QProcess(QObject*)'

error: undefined reference to `QProcess::~QProcess()'

Thank you !!!

Actions #1

Updated by Wim Dumon over 7 years ago

  • Status changed from New to Closed

Hello,

In CMakeLists.txt, use the ADD_LIBRARY()statement to add additional libraries to link your executable against.

Note that when using Qt, you may need to take provisions to let Wt work with Qt's assumption on threads, signals/slots, locking. The example wtwithqt demonstrates a possible approach to make Wt's and Qt's signal/slot and thread mechanisms compatible.

Best regards,

Wim.

Actions

Also available in: Atom PDF