Howto include private headers
-
I want to include private headers from a Qt module. Therefore the following lines are added to the module's .pro file:
PRIVATE_HEADERS += \ declarativechart_p.h
But after running "make" the private headers are not found. Are there other steps necessary for adding private headers?
-
I want to include private headers from a Qt module. Therefore the following lines are added to the module's .pro file:
PRIVATE_HEADERS += \ declarativechart_p.h
But after running "make" the private headers are not found. Are there other steps necessary for adding private headers?
You need to have
QT += $${modulename}-private
There is no special processing for
PRIVATE_HEADERS
variable in qmake, i.e. it's just your local variable -
The problem is that the private headers are not copied during building Qt from source: https://codereview.qt-project.org/218637
-
It seems like private headers need to be handled via sync.profile, not qmake