Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Creator can't find QGraphicsView includes
QtWS25 Last Chance

Creator can't find QGraphicsView includes

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 3 Posters 6.9k Views
  • 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 Offline
    D Offline
    daviddrell
    wrote on last edited by
    #1

    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
    0
    • M Offline
      M Offline
      mario
      wrote on last edited by
      #2

      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
      0
      • D Offline
        D Offline
        daviddrell
        wrote on last edited by
        #3

        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
        0
        • M Offline
          M Offline
          mario
          wrote on last edited by
          #4

          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
          0
          • C Offline
            C Offline
            chris16
            wrote on last edited by
            #5

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

            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