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. no such file or directory: 'QtWidgets'

no such file or directory: 'QtWidgets'

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 743 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.
  • firecatF Offline
    firecatF Offline
    firecat
    wrote on last edited by
    #1

    Re: QtWidget/QAction no such file or directory
    I encountered the same problem. How did you solve it in the end?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      OP has said it has helped already ;-) Don't use module/class syntax in include statements and you'll be fine.

      So do:

      #include <QAction> // good
      #include <QtWidgets/QAction> // bad, QAction is in QtGui module actually
      

      (Z(:^

      firecatF 1 Reply Last reply
      2
      • sierdzioS sierdzio

        OP has said it has helped already ;-) Don't use module/class syntax in include statements and you'll be fine.

        So do:

        #include <QAction> // good
        #include <QtWidgets/QAction> // bad, QAction is in QtGui module actually
        
        firecatF Offline
        firecatF Offline
        firecat
        wrote on last edited by
        #3

        @sierdzio said in no such file or directory: 'QtWidgets':

        OP has said it has helped already ;-) Don't use module/class syntax in include statements and you'll be fine.

        So do:

        #include <QAction> // good
        #include <QtWidgets/QAction> // bad, QAction is in QtGui module actually
        

        ok
        thank you

        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