QtGui/QAction: No such file or directory



  • In file included from ../../../Desktop/johorTrain/mainwindow.cpp:2:0:
    QtGui/QAction: No such file or directory

    The file is running fine this morning, suddenly it prompts an error in the afternoon. I don't remember making any amendment. Any help is appreciated


  • Moderators

    Maybe you have switched the Qt version in Kit settings?

    In Qt 4, QAction is part of QtGui module. In Qt 5, it is part of QtWidgets module. Best option is not to specify the module name when including the header.


Log in to reply
 

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