Results 1 to 7 of 7

Thread: QtGui/QAbstractButton no such file or directory

  1. #1
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default QtGui/QAbstractButton no such file or directory

    I compiled my program with qt 4.7, but when I load it in qt 5.0.1 i receive the following error for one of the header

    QtGui/QAbstractButton no such file or directory
    include does not have such header at all. you have any solution to fix this?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QtGui/QAbstractButton no such file or directory

    Have you
    qmake Code:
    1. QT += widgets
    To copy to clipboard, switch view to plain text mode 
    ?

  3. #3
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QtGui/QAbstractButton no such file or directory

    Quote Originally Posted by Lykurg View Post
    Have you
    qmake Code:
    1. QT += widgets
    To copy to clipboard, switch view to plain text mode 
    ?
    yes,

    QT += core gui svg
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets


    is this relevant to adding qt 4.8.4 or 4.7.4 libraries to qt 5.0.1 to support it? if yes, how can I do it wit patch?
    (in case qt 5 does not support these headers at all)

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QtGui/QAbstractButton no such file or directory

    ... and it should be of course
    Qt Code:
    1. #include <QtWidgets/QAbstractButton>
    To copy to clipboard, switch view to plain text mode 
    !

  5. #5
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QtGui/QAbstractButton no such file or directory

    Quote Originally Posted by Lykurg View Post
    ... and it should be of course
    Qt Code:
    1. #include <QtWidgets/QAbstractButton>
    To copy to clipboard, switch view to plain text mode 
    !
    could you tell why it is so different in qt 5?

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QtGui/QAbstractButton no such file or directory

    It is not that different, they just have put all widget stuff to an extra module. That's all.

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QtGui/QAbstractButton no such file or directory

    If you just remove the unnecessary module name from the include, then there is no change at all between Qt4 and Qt5
    I.e.
    Qt Code:
    1. #include <QAbstractButton>
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

Similar Threads

  1. QtGui/QApplication: No such file or directory
    By codeslicer in forum Qt Programming
    Replies: 4
    Last Post: 9th December 2011, 15:29
  2. Replies: 1
    Last Post: 8th November 2010, 03:24
  3. Replies: 4
    Last Post: 9th May 2010, 16:18
  4. Replies: 1
    Last Post: 3rd May 2010, 17:31
  5. Replies: 3
    Last Post: 6th October 2009, 08:38

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.