Results 1 to 7 of 7

Thread: qdeclarative.h no such file or directory

  1. #1
    Join Date
    Aug 2012
    Posts
    30
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default qdeclarative.h no such file or directory

    Hi I am including qdeclarative.h to my header file. Also I have added "QT += declarative " to my .pro file. But I still get no such file or directory error. Can you please help me how can I fix this error?

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: qdeclarative.h no such file or directory

    Include the headers without .h extension: #include <QtDeclarative> (run Rebuild All if still can't be found)

  3. #3
    Join Date
    Aug 2012
    Posts
    30
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qdeclarative.h no such file or directory

    That doesn't work =(

  4. #4
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: qdeclarative.h no such file or directory

    Have you tried with QtDeclarative? Because that's the include for the module and as far as i know there is no qdeclarative header.

    //also you can try to include another header from declarative module ex: #include <QDeclarativeView> and see if it works, and it might compile faster if you include only the headers you need.

  5. #5
    Join Date
    Aug 2012
    Posts
    30
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qdeclarative.h no such file or directory

    I tried that it still doesn't work. I included another one just like you said but that does not work either (Both with QDeclarativeView / QtDeclarativeView)=(

  6. #6
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qdeclarative.h no such file or directory

    Show us your pro-file.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  7. #7
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: qdeclarative.h no such file or directory

    A completion for when i said Rebuild All: that should be Run qmake and then Rebuild All and it should work, if it still doesn't do as spirit said and post the .pro file and also make sure you have Qt 4.7 or newer.

Similar Threads

  1. Undeclarared reference to Qdeclarative
    By in_dbasu in forum Qt Quick
    Replies: 1
    Last Post: 15th July 2012, 10:41
  2. Replies: 1
    Last Post: 23rd May 2011, 04:53
  3. Replies: 1
    Last Post: 8th November 2010, 03:24
  4. Replies: 4
    Last Post: 9th May 2010, 16:18
  5. Replies: 2
    Last Post: 9th March 2010, 05:21

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.