Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. Qt Contribution
  4. Howto include private headers
QtWS25 Last Chance

Howto include private headers

Scheduled Pinned Locked Moved Solved Qt Contribution
4 Posts 2 Posters 5.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PS76
    wrote on 31 Jan 2018, 14:42 last edited by
    #1

    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?

    K 1 Reply Last reply 31 Jan 2018, 14:49
    0
    • P PS76
      31 Jan 2018, 14:42

      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?

      K Offline
      K Offline
      Konstantin Tokarev
      wrote on 31 Jan 2018, 14:49 last edited by
      #2

      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

      1 Reply Last reply
      1
      • P Offline
        P Offline
        PS76
        wrote on 31 Jan 2018, 17:46 last edited by
        #3

        The problem is that the private headers are not copied during building Qt from source: https://codereview.qt-project.org/218637

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Konstantin Tokarev
          wrote on 31 Jan 2018, 18:17 last edited by
          #4

          It seems like private headers need to be handled via sync.profile, not qmake

          1 Reply Last reply
          0

          2/4

          31 Jan 2018, 14:49

          • Login

          • Login or register to search.
          2 out of 4
          • First post
            2/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved