Howto include private headers
-
wrote on 31 Jan 2018, 14:42 last edited by
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?
wrote on 31 Jan 2018, 14:49 last edited byYou 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 -
wrote on 31 Jan 2018, 17:46 last edited by
The problem is that the private headers are not copied during building Qt from source: https://codereview.qt-project.org/218637
-
wrote on 31 Jan 2018, 18:17 last edited by
It seems like private headers need to be handled via sync.profile, not qmake
2/4