Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-13280

Template "Qt Widgets Application" doesn't compile with Qt5 and Use Qt module name.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: Qt Creator 3.1.1, Qt Creator 3.3.0-rc1
    • Fix Version/s: Qt Creator 3.3.0-rc1
    • Component/s: All Other Issues
    • Labels:
    • Environment:
      Qt Creator 3.1.1(MSVC2010 32bit)
      Qt5.3.0
      Windows8 64bit
    • Commits:
      e0b31be804d7ffecb1f796f5111e422aa7e18f15

      Description

      This template with setting
      'Use Qt module name in #include-directive'
      and 'Add Qt version #ifdef for module names'
      generate code

      ================================
      #if QT_VERSION >= 0x050000
      #include <QtWidgets/QMainWindow>
      #else
      #include <QtGui/QMainWindow>
      #endif
      ...
      ================================

      but QT_VERSION defined in qglobal.h that included by QMainWindow->QWidget->qwindowdefs.h .

      First #if directive is always false.

      ref: Qt Creator QTCREATORBUG-13267 Qt Widgets Application template outputs #include <QtGui/QMainWindow> which doesn't compile
      https://bugreports.qt-project.org/browse/QTCREATORBUG-13267

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                hunger Tobias Hunger
                Reporter:
                atsushi4 YAMAMOTO Atsushi
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes