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. [Solved] Is QMessageBox missing from Qt5-RC2?
Forum Updated to NodeBB v4.3 + New Features

[Solved] Is QMessageBox missing from Qt5-RC2?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 16.2k 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.
  • S Offline
    S Offline
    sfilippidis
    wrote on last edited by
    #1

    I try to compile a program with Qt5-RC2 and it doesn't seem to recognize QMessageBox.

    I tried adding

    @#include <QMessageBox>@

    but I get a message

    bq. QMessageBox: No such file or directory

    I am using Qt5-RC2's Mac version ("this":http://releases.qt-project.org/qt5.0/rc2/qt-mac-opensource-5.0.0-rc2-clang-offline.dmg) from the "downloads":http://qt-project.org/downloads page. My Mac uses OS X 10.8.2.

    https://www.filippidis.name/

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sfilippidis
      wrote on last edited by
      #2

      I found the solution myself, and I post it here for other people having the same problem:

      For my old project (initially developed for Qt4) I added widgets with the QT+= list of my .pro file.

      https://www.filippidis.name/

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

        If you are using @#include<QtGui/QMessageBox>@ then you want to change those, too.

        Either use @#include <QtWidgets/QMessageBox>@ if you want to be Qt 5 only or @#include <QMessageBox>@ if you want to build against both Qt 4 and Qt 5.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sfilippidis
          wrote on last edited by
          #4

          Thanks for the advice!

          I am still having some other issues with the SQLite database I use with my application, and I am still trying to find out what causes the problem.

          https://www.filippidis.name/

          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