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. Compiler Error : use of undefined type ' '

Compiler Error : use of undefined type ' '

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 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.
  • V Offline
    V Offline
    vinothrajendran4
    wrote on 3 Mar 2017, 03:23 last edited by
    #1

    Hi Community,
    I get the following compiler error
    C2027: use of undefined type 'QMap <QString,QVariant>' from qvariant.h

    Any idea what i have failed to add ?

    Regards,
    Vinoth R

    J 1 Reply Last reply 3 Mar 2017, 05:15
    0
    • V vinothrajendran4
      3 Mar 2017, 03:23

      Hi Community,
      I get the following compiler error
      C2027: use of undefined type 'QMap <QString,QVariant>' from qvariant.h

      Any idea what i have failed to add ?

      Regards,
      Vinoth R

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 3 Mar 2017, 05:15 last edited by
      #2

      @vinothrajendran4 Did you include QMap?

      #include <QMap>
      

      You should show the code causing this error.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 3 Mar 2017, 19:50 last edited by
        #3

        Hi,

        To add to @jsulm, did you add #include <QVariant> ?

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

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Crawl.W
          wrote on 18 Nov 2019, 12:53 last edited by Crawl.W
          #4

          When I declare a func which ret type is QVariantList, report error error: C2027: use of undefined type 'QVariant'.In this case, we need include #include <QVariant> in the header file.

          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