Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.1.1 QtCreator auto-completion / code highlighting / code-model (?)
Forum Updated to NodeBB v4.3 + New Features

Qt 5.1.1 QtCreator auto-completion / code highlighting / code-model (?)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.6k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    andrewnm
    wrote on last edited by
    #1

    I've started to use Qt 5.1.1 with it's embedded QtCreator on my MacOS 10.6.8. I need to work with CMake and it build project fine. But I have issues with QtCreator - a lot of underlined text (warnings) and there is no auto-completion for Qt classes/objects (for example if I write '.' after some object). All this works when I'm using QMake so code-model seems to be fine.. but in case of CMake it just not works. Previously I've worked with Qt4 and CMake and everything was okay.. what can be wrong with Qt5? Maybe I need to provide more information about my Qt installation for QtCreator - but I have no idea how to do this.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Creator queries the include paths from the build system. In the cmake case we get them from a xml file in the build directory (can't remember the name right now, sorry).

      Could you check whether the include paths are correct there?

      1 Reply Last reply
      0
      • O Offline
        O Offline
        ortho2005
        wrote on last edited by
        #3

        That's right all you need is to set include path to
        <Path Qt5.1.1 installed>/5.1.1/clang_64/include

        Here is my solution:

        @
        find_package(Qt5Widgets)
        if(Qt5Widgets_FOUND)
        string(REPLACE "/bin/moc" "/include" QT5_INCLUDES ${QT_MOC_EXECUTABLE})
        include_directories(SYSTEM ${QT5_INCLUDES})
        endif()
        @

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andrewnm
          wrote on last edited by
          #4

          Thanks a lot guys! Works like a charm! Sorry for delay with comments - because of that issue I've switched to windows part of development and just didn't checked this thread.

          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