Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Creator can't find QGraphicsView includes

    Installation and Deployment
    3
    5
    6445
    Loading More Posts
    • 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.
    • D
      daviddrell last edited by

      I just installed Qt Creator 2.0.0 built June 21, 2010, on to windows from the binary installer.

      Trying to play around with QGraphics view, but none of these includes are found when compiling,

      nor found by the Creator intellisence facility.

      #include <QGraphicsView>
      #include <QGraphicsScene>
      #include <QGraphicsItem>

      I found the includes in c:/Qt/2010.04/qt/include/Qt/

      but why can't Qt Creator find or the compiler find them?

      1 Reply Last reply Reply Quote 0
      • M
        mario last edited by

        You should first try to clean your build and re-run qmake and see if that fixes the problem (which it should if you can run qmake successfully). This can happen if you have an old build with files pointing to some Qt-SDK:s not longer valid on your system

        If qmake isn't found, check under "Tools/Options/Qt4". You should at least find one entry. If not, add qmake from c:/Qt/2010.04/... and try again.

        Hope this solves the problem.

        1 Reply Last reply Reply Quote 0
        • D
          daviddrell last edited by

          Thanks Mariio but that did not solve the problem. I just noticed that in my first post the included file names did not show up. Here it is again, with code block markers. Hopefully this time you will see that its QGraphics headers which are the problem. All the other normal class headers show up just fine. qmake is found and the default paths seem to work.

          Is there a Qt lib include I need to add to my .pro file to get QGraphics ?

          @
          #include <QGraphicsItem>
          #include <QGraphicsView>
          #include <QGraphicsScene>
          @

          1 Reply Last reply Reply Quote 0
          • M
            mario last edited by

            Huh, that is certainly strange. The graphics stuff is included in the Gui module.

            My boring answer is that you could try download a new fresh package of the Qt libraries and try using that when compiling.

            1 Reply Last reply Reply Quote 0
            • C
              chris16 last edited by

              I ran into a similar issue. Make sure widgets is included in your .pro file.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post