I am trying to compile a test application for an ARM embedded device. If I use my Desktop Qt SDK version of Qt, this header file compiles just fine. If I use my Linaro GCC for the Embedded target from within Qt Creator, I get the error "'QLCDNumber' does not name a type" on the line of the private declaration for lcdNumber. I've googled around but do not see any solutions that work for this.
Is the problem that my embedded version of qt is missing support for QLCDNumber? If so, why doesn't it complain about the #include ? Also, if this is the case, does anyone happen to know what I need to enable in ./configure to enable support for QLCDNumber?
#ifndef BATTERYMONITOR_H
#define BATTERYMONITOR_H
#include <QtGui>
#include <QWidget>
#include <QLabel>
#include <QRadioButton>
#include <QLCDNumber>
class BatteryMonitor : public QWidget
{
Q_OBJECT
public:
BatteryMonitor(QWidget *parent = 0);
public slots:
void clickedBatteryStatus();
private:
QRadioButton *temperature;
QRadioButton *voltage;
QRadioButton *current;
QRadioButton *relativeStateOfCharge;
QRadioButton *batteryStatus;
QRadioButton *runTimeToEmpty;
QLCDNumber *lcdNumber;
};
#endif // BATTERYMONITOR_H
Did it config with QT_NO_LCDNUMBER
defined in your embedded Qt SDK? You can check it in file $QTDIR/include/QtCore/qconfig.h
.
QLCDNumber
and qlcdnumber.h
are in the right include path of Qt SDK no matter macro QT_NO_LCDNUMBER
defined or not. So there is nothing wrong about #include <QLCDNumber>
.