qmake

How to convert qmake to cmake?

女生的网名这么多〃 提交于 2019-12-28 05:52:17
问题 I have a .pro file on my project, but now I want to port it to a CMakeLists.txt file. How can I do this? QT += core QT -= gui CONFIG += c++11 TARGET = test CONFIG += console CONFIG -= app_bundle TEMPLATE = app QT += network SOURCES += main.cpp \ test_interface.cpp \ motomanlibrary.cpp \ processing.cpp SOURCES += main.cpp \ test_interface.h \ motomanlibrary.h \ processing.h 回答1: QMake: The required libraries. QT += core QT -= gui QT += network CMake: only the add is necessary. An exclude (QT -

How to read file content into a qmake variable and pass it to the compiler?

北城以北 提交于 2019-12-25 09:04:41
问题 How to read file content into a variable in qmake project file? For example, I'd like to have the contents of KEY read from a file and pass it to the compiler: DEFINES += KEY=**some magic and filename here** 回答1: On all platforms, there's a built-in replace function $$cat : # set a qmake variable KEY = "$$cat(/path/to/the/file)" # propagate the variable to C/C++ DEFINES += "KEY=\"$$KEY\"" The effect of this line is the same as if you added the following line at the beginning of every

Free and easy Qt 5.1.0 or Qt 4.8.5 reporting engine [closed]

你。 提交于 2019-12-25 05:38:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . i got hard to print report using NCReport library so there an other esay solution for printing i always got errors when i want to compiler my programme using qt 4.8.5 and ncreport engine her is the error C:\test\build-Ncreport-Qt_4_8_5_MinGW_32_bit-Debug\debug\mainwindow.o:-1: In function `MainWindow': C:\test

Free and easy Qt 5.1.0 or Qt 4.8.5 reporting engine [closed]

岁酱吖の 提交于 2019-12-25 05:38:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . i got hard to print report using NCReport library so there an other esay solution for printing i always got errors when i want to compiler my programme using qt 4.8.5 and ncreport engine her is the error C:\test\build-Ncreport-Qt_4_8_5_MinGW_32_bit-Debug\debug\mainwindow.o:-1: In function `MainWindow': C:\test

Undefined symbols for architecture x86_64: cv::CascadeClassifier::CascadeClassifier()

白昼怎懂夜的黑 提交于 2019-12-25 03:54:48
问题 I am using openCV 2.4.6.1 in Qt 5.2 on OSX. Everything is fine but when I try to use the cv::CascadeClassifier, a linking error occurs show me that this symbol is not defined for architecture x86_64. Any idea for solving this? Thanks. TEMPLATE = app TARGET = camera QT += multimedia multimediawidgets INCLUDEPATH += /usr/local/Cellar/opencv/2.4.6.1/include \ LIBS += -L/usr/local/Cellar/opencv/2.4.6.1/lib \ -lopencv_core \ -lopencv_imgproc \ -lopencv_features2d \ -lopencv_highgui HEADERS = \

Compile error when running make after Qmake

冷暖自知 提交于 2019-12-25 03:15:28
问题 I'm trying to compile something from github: https://github.com/com2m/anki-overdrive-goes-iot/ When Running Qmake everthings seems fine, but whe in run make i get the follwoing error: g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_BLUETOOTH_LIB -DQT_CORE_LIB -I. -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtBluetooth -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux

QT Signal / Slot

懵懂的女人 提交于 2019-12-25 01:39:03
问题 I've got a question about signals and slots. In my app, I want to connect a signal from one object to a textEdit in a dialog window. My signal emits a QString ; if I violate encapsulation (by making the UI public instead of private) and connect the signal directly to the textEdit it works. But I feel that it's not the right way. If I make something like the following: connect(m_osgWidget->picker.get(), SIGNAL(setX(QString)), m_addAgentDlg, SLOT(getX(QString))); where: void getX(QString) {

dyld: Library not loaded: libqscintilla2.5.dylib

别说谁变了你拦得住时间么 提交于 2019-12-24 11:23:57
问题 I'm trying to use QScintilla on MacOS X, I added LIBS += -lqscintilla2 in the .pro, with this quite simple code: #include <QApplication> #include <Qsci/qsciscintilla.h> int main(int argc, char* argv[]) { QApplication app(argc, argv); QsciScintilla *qscintilla = new QsciScintilla; qscintilla->show(); return app.exec(); } (Im using QtCreator btw) Here is the error : dyld: Library not loaded: libqscintilla2.5.dylib Referenced from: /Users/lubethan/cxx-proj/NightPad/NightPad.app/Contents/MacOS

Qmake and Make using separate folders for sources and headers

这一生的挚爱 提交于 2019-12-24 10:10:39
问题 I'm going mad on this stupid problem. I've a tree like this: src |--- sources |--- one.cpp |--- two.cpp |--- sources.pro |--- headers |--- one.h |--- two.hpp |--- headers.pro |--- src.pro I tried EVERYTHING to make it look in both the folders, but somehow I can't get it working. I don't know much about QMake, but I tought it was easy. And I was wrong. So actually I ended up having the src.pro file in this way: QT += dbus CONFIG += warn_on DEFINES = QT_FATAL_WARNINGS QT_NO_DEBUG_OUTPUT devel {

Is it possible to modify QT qmake variable in the parent subdirs project?

情到浓时终转凉″ 提交于 2019-12-24 03:32:36
问题 I have the shared library project with structure like this: library.pro: TEMPLATE = subdirs CONFIG += ordered SUBDIRS += libs plugins test_programs ... QT += concurrent ... # Those files contains pure interfaces (C++ abstract classes) # with no implementation, and some helper classes with inline implementation. # So there is no reason to create yet another subproject for them HEADERS += iface/IInterface1.h \ iface/IInterface2.h \ # IInterface2 needs QtConcurrent ... IInterface2.h: ...