Search code examples
c++linuxqtqt5qtonpi

How can I fix my C++ includes for QtonPi?


I am trying to cross compile my windows/mac/linux application to Qt On Pi 0.2, I have a build environment setup for this purpose and am trying to work my way though its configuration.

However where I have:

#include <QApplication>
#include <QDebug>

it's telling me that it cannot find it unless I change it to:

#include <QtWidgets/QApplication>
#include <QtCore/QDebug>

I don't really want to change all my includes as this is a big application. What am I missing in my environment setup to cure this?

This is a ubuntu 12.04 32bit setup.


Solution

  • Ok, someone over at Qt On Pi Mailing list pointed out that I needed to include the:

    QT += widgets
    

    in my qmake project file.