Results 1 to 9 of 9

Thread: Many errors in qvariant.h

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Location
    Kiev, Ukraine
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question Many errors in qvariant.h

    Hi.
    I am porting project from Qt3 to Qt4 also porting it to QtCreator. Project consist of huge count of files and dependencies and now i resolving unresolved symbols for linker. When i add another file to project i see many compiler errors in qvariant.h . That is strange error such as " '::~QVariant' : illegal global destructor" - it looks like it can not understand that it is name space of QVariant class but upper there is "class Q_CORE_EXPORT QVariant"; or it can not understand that "QVariant(const QString &string);" is a constructor but think that it is function and say that i need to add return type, imho second error also tells that it can not see class name space. I dont understand how it can be and how my project can cause this errors.
    Help please to solve this or just show steps how such error could be investigated.

    Qt 4.7.2, compiler from mvs2008
    Attached Files Attached Files
    Last edited by wysota; 26th May 2011 at 12:28. Reason: removed URL

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Many errors in qvariant.h

    QVariant does not normally throw errors. It sounds as though you're hauling Qt3 source files into your new Qt4 project.

  3. #3
    Join Date
    Dec 2009
    Location
    Kiev, Ukraine
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Many errors in qvariant.h

    But if i double click on error in QtCreator it sends me to qvariant from Qt4 and i check that system have no access to old qvariant

    could it be because of some redeclaration or some other includes cause ?

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Many errors in qvariant.h

    How do you know "system have no access to old qvariant"?

    If there's a redefinition somewhere, it's somewhere in your code or code you're using from outside of Qt. This seems unlikely, but go ahead and look.

    I still think you've got Qt3 installed on your system and Qt4 is trying to use parts of it, or vice versa.

  5. #5
    Join Date
    Dec 2009
    Location
    Kiev, Ukraine
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Many errors in qvariant.h

    i renamed all qt3 directories and thats why i think it cant find it

    i looked for redifinition and only find that in headers generated from uis qvariant included twice
    Qt Code:
    1. #include <qvariant.h>
    2.  
    3. #include <ActiveQt/QAxWidget>
    4. #include <Qt3Support/Q3GroupBox>
    5. #include <Qt3Support/Q3MimeSourceFactory>
    6. #include <Qt3Support/Q3WidgetStack>
    7. #include <QtCore/QVariant>
    To copy to clipboard, switch view to plain text mode 

    can it cause my problem why uic3 do it ?

  6. #6
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Many errors in qvariant.h

    You should uninstall Qt3 completely.

    Better yet, uninstall ALL Qt versions you have, then do a clean install of Qt4 only.

  7. #7
    Join Date
    Dec 2009
    Location
    Kiev, Ukraine
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Many errors in qvariant.h

    i unistall all qts and then install 4.7.2 but it does not solve problem...

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Many errors in qvariant.h

    What does your .pro file look like?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 4
    Last Post: 4th January 2011, 12:07
  2. Replies: 1
    Last Post: 4th December 2009, 17:03
  3. VARIANT <-> QVariant
    By will49 in forum Qt Programming
    Replies: 2
    Last Post: 26th September 2009, 23:39
  4. a question about QVariant
    By calmspeaker in forum Qt Programming
    Replies: 4
    Last Post: 14th August 2009, 07:42
  5. QVariant compile errors
    By ntp in forum Installation and Deployment
    Replies: 3
    Last Post: 14th May 2008, 19:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.