[Development] Qt 5 Beta - undefined reference to QWidget
Thiago Macieira
thiago.macieira at intel.com
Mon Sep 10 11:40:53 CEST 2012
On segunda-feira, 10 de setembro de 2012 10.55.21, Fabian.Gruber at conti-
engineering.com wrote:
> Hi,
>
> I'm testing Qt 5 Beta with a simple Qt Widget Project on Linux.
> Mainly it's the one you get when creating a new project without any forms.
> In the .pro file I added widgets, qml and quick to the QT-variable.
>
> When compiling the project I get the following errors:
>
> moc_mainwindow.o:(.data.rel.ro._ZTV10MainWindow[vtable for
> MainWindow]+0xc4): undefined reference to `QWidget::styleChange(QStyle&)'
> moc_mainwindow.o:(.data.rel.ro._ZTV10MainWindow[vtable for
> MainWindow]+0xc8): undefined reference to `QWidget::enabledChange(bool)'
> moc_mainwindow.o:(.data.rel.ro._ZTV10MainWindow[vtable for
> MainWindow]+0xcc): undefined reference to `QWidget::paletteChange(QPalette
> const&)'
> moc_mainwindow.o:(.data.rel.ro._ZTV10MainWindow[vtable for
> MainWindow]+0xd0): undefined reference to `QWidget::fontChange(QFont
> const&)'
> moc_mainwindow.o:(.data.rel.ro._ZTV10MainWindow[vtable for
> MainWindow]+0xd4): undefined reference to
> `QWidget::windowActivationChange(bool)'
> moc_mainwindow.o:(.data.rel.ro._ZTV10MainWindow[vtable for
> MainWindow]+0xd8): undefined reference to `QWidget::languageChange()'
>
> Any idea on how to fix it?
In your .pro file, make sure you have:
QT += widget
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
More information about the Development
mailing list