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. QtWidgets/QAction: No such file or directory
Forum Updated to NodeBB v4.3 + New Features

QtWidgets/QAction: No such file or directory

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 5 Posters 4.5k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Matti Aalto
    wrote on last edited by
    #1

    I have done little program by Qt 5 four years ago, and compiled it without problems. Now I installed Qt 6.1.2, on Windows 7, and tried to compile and build. Otherwise everything seems to be allright but i got error message:
    D:\Programming\Heating\SimplyHeatTransfer\ui_mainwindow.h:14: error: QtWidgets/QAction: No such file or directory
    In file included from ..\SimplyHeatTransfer\mainwindow.cpp:2:
    ..\SimplyHeatTransfer\ui_mainwindow.h:14:10: fatal error: QtWidgets/QAction: No such file or directory
    #include <QtWidgets/QAction>
    and : -1: error: [Makefile.Release:608: release/mainwindow.o] Error 1

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      A quick look at the Qt 6 QAction documentation shows it has move to QtGui.

      You should update your include or rather drop the module part of the include.

      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
      2
      • J Offline
        J Offline
        JGBe
        wrote on last edited by
        #3

        Hello and thank you,

        Unfortunately this does not help, because ui_mainwindow.h is automatically generated in the build process.

        Christian EhrlicherC 1 Reply Last reply
        0
        • J JGBe

          Hello and thank you,

          Unfortunately this does not help, because ui_mainwindow.h is automatically generated in the build process.

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JGBe said in QtWidgets/QAction: No such file or directory:

          because ui_mainwindow.h is automatically generated in the build process.

          What build system do you use? Make sure it's not picking up the wrong uic.exe from Qt5.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • A Offline
            A Offline
            abcd999
            wrote on last edited by
            #5

            Try deleting the ui_*.h file and try again

            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