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

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 3.3.0-rc1
    • Qt Creator 3.1.1, Qt Creator 3.3.0-rc1
    • All Other Issues
    • Qt Creator 3.1.1(MSVC2010 32bit)
      Qt5.3.0
      Windows8 64bit
    • 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

          For Gerrit Dashboard: QTCREATORBUG-13280
          # Subject Branch Project Status CR V

          Activity

            People

              hunger Tobias Hunger
              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