Do I need to include Q headers inner Q headers and to make these pre-compiled
Locked
Unsolved
General and Desktop
-
My fresh project builds for 2-4 seconds which is not good, put pragma once to headers an made one with Qt headers PRECOMPILED
Ubuntu, Jammy Fish, 6.2.4, Huawei D15
Need to speed up to zero or 1 second
Some KDAB guys say you need to make PCH all Qt headers in compiling chainPlease advise
#pragma once #ifndef Static_lib_H #define Static_lib_H #if defined __cplusplus /* Add C++ includes here */ #include <QDialog> #include <QStandardItemModel> #include <QMainWindow> #include <QWidget> #include <string.h> #include <iostream> #include <QApplication> #endif using namespace std; class Static_lib { public: Static_lib(); };
QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 # # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 PRECOMPILED_HEADER = Static_lib.h SOURCES += \ Static_lib.cpp main.cpp mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
-
@JacobNovitsky said in Do I need to include Q headers inner Q headers and to make these pre-compiled:
Need to speed up to zero or 1 second
Why?
-
There is always better, faster, wider etc...
Depending on the environment and use case, 4secs is not that long. -
-
Please stop spamming the forum with the same question...
-
C Christian Ehrlicher locked this topic on