Results 1 to 5 of 5

Thread: QWidget No such file or directory

  1. #1
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QWidget No such file or directory

    Hmm... getting a compiler error for

    Qt Code:
    1. #include <QWidget>
    To copy to clipboard, switch view to plain text mode 

    not sure why it can't seem to find this???

    When I searched my computer I found a few qwidget.h files:

    D:\QtSDK\Symbian\SDKs\Symbian3Qt473\include\Qt
    D:\QtSDK\Symbian\SDKs\Symbian1Qt473\include\Qt
    D:\QtSDK\Simulator\Qt\mingw\include\QtGui
    D:\QtSDK\Desktop\Qt\4.7.3\mingw\include\Qt
    D:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\QtGui
    D:\QtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-20.2010.36-2-slim\usr\include\Qt

    So it seems like I definitely have this header on my computer.
    Last edited by Atomic_Sheep; 14th October 2015 at 10:44.

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWidget No such file or directory

    But qwidget.h and QWidget is not the same.

  3. #3
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QWidget No such file or directory

    If you use Qt 5, your .pro file needs
    Qt Code:
    1. QT += widgets
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QWidget No such file or directory

    I'm using 4.7.4.

    Why are they not the same?

    I'm:

    Qt Code:
    1. #include <QWidget>
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QWidget No such file or directory

    Quote Originally Posted by Atomic_Sheep View Post
    I'm using 4.7.4.
    If this is related to your other thread, then remove the
    Qt Code:
    1. QT -= gui
    To copy to clipboard, switch view to plain text mode 

    Quote Originally Posted by Atomic_Sheep View Post
    Why are they not the same?
    qwidget.h and QWidget are obviously not the same file, but they do both provide the same declarations.
    (one is including the other).

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 25th July 2013, 06:17
  2. Replies: 1
    Last Post: 23rd May 2011, 04:53
  3. Replies: 10
    Last Post: 15th February 2011, 07:29
  4. Replies: 1
    Last Post: 8th November 2010, 03:24
  5. Replies: 4
    Last Post: 9th May 2010, 16:18

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.