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. Field '_var' has incomplete type
Forum Update on Monday, May 27th 2025

Field '_var' has incomplete type

Scheduled Pinned Locked Moved General and Desktop
qpointerfieldincompletetype
3 Posts 2 Posters 2.2k 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.
  • L Offline
    L Offline
    lespaul
    wrote on 22 Apr 2015, 09:08 last edited by lespaul
    #1

    Hello, I got I library inwich I have another class as a QPointer
    QPointer<Other_Class> _var;

    I use this somewhere else, and it works fine.
    Then I created another class,
    Lib_Class * _libClass;
    and suddenly it wont work with the message:
    field '_var' has incomplete type.

    I don not use forward declarations or structs here (most of web searches complain about structs or forwarddeclarations)
    I dont know what else to do??

    I appreciate any help and thnx in advance

    Sincerly,
    LesPaul

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Apr 2015, 09:53 last edited by
      #2

      Hi and welcome to devnet,

      Did you check your includes in order to use Other_Class ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply 22 Apr 2015, 12:03
      0
      • S SGaist
        22 Apr 2015, 09:53

        Hi and welcome to devnet,

        Did you check your includes in order to use Other_Class ?

        L Offline
        L Offline
        lespaul
        wrote on 22 Apr 2015, 12:03 last edited by lespaul
        #3

        @SGaist Oh man exactly they forgot to include the
        #include <QPointer>

        Thnx for that help!

        1 Reply Last reply
        0

        1/3

        22 Apr 2015, 09:08

        • Login

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