Errors in moc files



  • I am trying to port an application from one laptop with Qt 4.8 SDK to another with Qt 5.3

    After a lot of fiddling, I am at this point:

    When I try to build the following error pops up:

     Invalid use of imcomplete type 'class QIcon'            moc_application.cpp
    

    The code line(177) is: case 0: reinterpret_cast<QIcon>(_v) = windowIcon(); break;

    If I comment this out then a ton of similar errors pop up in other moc files.
    These are autogenerated so I am not sure what to do.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What fiddling did you need other than adding

    @QT += widgets@

    to your pro file ?



  • A few deprecated methods and constants,

    but I solved the problem by simply creating a new project and copying and pasting the code there

    thanks


  • Lifetime Qt Champion

    You're welcome !

    Since your project is running now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.