Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator and CMake: includes not found on OS X
Forum Updated to NodeBB v4.3 + New Features

QtCreator and CMake: includes not found on OS X

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 2 Posters 1.7k 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.
  • N Offline
    N Offline
    ntadej
    wrote on last edited by
    #1

    I have problems with latest QtCreator 3.0, Qt 5.2 and CMake project on OS X Mavericks.

    My project uses Qt includes in a form #include <module/class>, for example:
    @#include <QtCore/QTimer>
    #include <QtGui/QMouseEvent>
    #include <QtWidgets/QHBoxLayout>
    #include <QtWidgets/QLabel>
    #include <QtWidgets/QSlider>@

    None of these includes are found by QtCreator's editor so I get include warnings and cannot use autocomplete and code is not highlighted.

    I already tried reinstalling QtCreator and Qt, deleting config files, creating dummy project and nothing helped. Any ideas?

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

      Creator gets the list of include directories from cmake. So did you configure Qt correctly there? Creator does not apply any of its settings to CMake. So the Qt selected in the Kit you are using is not communicated to cmake, neither is the compiler, etc. You unfortunately have to do this yourself.

      Having said this: If the project builds, then the headers should also be found by Creator. So does it build?

      1 Reply Last reply
      0
      • N Offline
        N Offline
        ntadej
        wrote on last edited by
        #3

        The project builds successfully. I use recommended Qt5 macros for CMake. The same issue occurs with a new hello world project.

        There may be a bug in Creator which makes new Qt5 macros incompatible with it's parsing of cmake files/cache. I can fix the issue with manually applying include directories for each Qt module.

        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