Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Q_DECL_OVERRIDE C++ 11 on Mac with QQuickWindow
Forum Updated to NodeBB v4.3 + New Features

Q_DECL_OVERRIDE C++ 11 on Mac with QQuickWindow

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 2 Posters 1.9k Views 2 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.
  • J Offline
    J Offline
    jmacey
    wrote on last edited by jmacey
    #1

    Hi,

    I'm currently using the openglunderqml demo as a template for using my own C++ 11 GL library with QML. (Qt 5.5.1)

    I can compile the demo fine under linux with the addition of the CONFIG+=c++11 flags, however if I add the same flags to the mac build I get the following errors

    qquickwindow.h:174:38: error: only virtual member functions can be marked 'override'
    void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;

    qcompilerdetection.h:1014:26: note: expanded from macro 'Q_DECL_OVERRIDE'
    define Q_DECL_OVERRIDE override

    Anyone else had this problem and know how to solve it? ( I'm using clang++ -v
    Apple LLVM version 7.0.2 (clang-700.1.81)
    Target: x86_64-apple-darwin15.4.0)

    It compiles fine under mac without the C++ 11 flags so I'm presuming it's some form of issue with C++ 11 (and I understand the override mechanism and the functions should be virtual etc) so I'm guessing this is a bug?

    Any help would be appreciated.

    Jon

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      If I understand you correctly adding CONFIG += c++11 to the .pro file of the openglunderqml example makes the build fail on OS X ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        If I understand you correctly adding CONFIG += c++11 to the .pro file of the openglunderqml example makes the build fail on OS X ?

        J Offline
        J Offline
        jmacey
        wrote on last edited by
        #3

        @SGaist Yes but not under Linux

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Just tested with an older version of Xcode and a more recent version of Qt but I haven't had that problem.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply
          0
          • SGaistS SGaist

            Just tested with an older version of Xcode and a more recent version of Qt but I haven't had that problem.

            J Offline
            J Offline
            jmacey
            wrote on last edited by jmacey
            #5

            @SGaist Interesting, I'm on the latest OSX 10.11.4 Beta, I wonder if that is an issue. Will investigate more

            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