Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Forward declaration error inside include qtableview.h

Forward declaration error inside include qtableview.h

Scheduled Pinned Locked Moved Solved General and Desktop
forwarddeclarationqheaderviewbuilding errorqt sources
5 Posts 3 Posters 1.9k 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.
  • S Offline
    S Offline
    smillmorel
    wrote on last edited by
    #1

    Hello.
    I'm trying to build this program using Qt Creator but during compilation I get this error:
    0_1538406707681_Screenshot_20181001_111116.png

    The compiler is calling incomplete type class QHeaderView and directs the problem to the forward declaration of QHeaderView inside qtableview.h. I have no idea what could be causing this since qtableview.h is a file from Qt sources. Nothing has been modified inside those files.
    Any help would be appreciated.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Just include QHeaderView in your cpp file.

      (Z(:^

      1 Reply Last reply
      1
      • S Offline
        S Offline
        smillmorel
        wrote on last edited by
        #3

        It worked, thanks.
        Don't really know what happended there, but it did work.
        Thank you very much.

        sierdzioS 1 Reply Last reply
        0
        • S smillmorel

          It worked, thanks.
          Don't really know what happended there, but it did work.
          Thank you very much.

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by sierdzio
          #4

          @smillmorel said in Forward declaration error inside include qtableview.h:

          Don't really know what happended there, but it did work.

          There is no magic to it. Some Qt classes only forward declare the classes they use internally. If you use them in your code, you need to include them on your side.

          (Z(:^

          A 1 Reply Last reply
          1
          • sierdzioS sierdzio

            @smillmorel said in Forward declaration error inside include qtableview.h:

            Don't really know what happended there, but it did work.

            There is no magic to it. Some Qt classes only forward declare the classes they use internally. If you use them in your code, you need to include them on your side.

            A Offline
            A Offline
            Am_HSS
            wrote on last edited by
            #5

            @sierdzio hhhhh

            1 Reply Last reply
            0

            • Login

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