This is the pro file :
QT += core gui
TEMPLATE = app
CONFIG += qt debug_and_release
TARGET = gui_plu
INCLUDEPATH += ../AnalogWidgets/analogwidgets/analogwidgets \
../AnalogWidgets/analogwidgets/code
HEADERS += form.h \
../AnalogWidgets/analogwidgets/analogwidgets/wallclock.h \
../AnalogWidgets/analogwidgets/analogwidgets/widgetwithbackground.h \ (<<< the line I delete ... )
../AnalogWidgets/analogwidgets/analogwidgets/led.h \
../AnalogWidgets/analogwidgets/plugins/led_plugin.h \
../AnalogWidgets/analogwidgets/plugins/wallclock_plugin.h
SOURCES += form.cpp \
main.cpp \
../AnalogWidgets/analogwidgets/code/wallclock.cpp \
../AnalogWidgets/analogwidgets/code/widgetwithbackground.cpp \
../AnalogWidgets/analogwidgets/code/led.cpp \
../AnalogWidgets/analogwidgets/plugins/wallclock_plugin.cpp \
../AnalogWidgets/analogwidgets/plugins/led_plugin.cpp
FORMS += \
form.ui
QT += core gui
TEMPLATE = app
CONFIG += qt debug_and_release
TARGET = gui_plu
INCLUDEPATH += ../AnalogWidgets/analogwidgets/analogwidgets \
../AnalogWidgets/analogwidgets/code
HEADERS += form.h \
../AnalogWidgets/analogwidgets/analogwidgets/wallclock.h \
../AnalogWidgets/analogwidgets/analogwidgets/widgetwithbackground.h \ (<<< the line I delete ... )
../AnalogWidgets/analogwidgets/analogwidgets/led.h \
../AnalogWidgets/analogwidgets/plugins/led_plugin.h \
../AnalogWidgets/analogwidgets/plugins/wallclock_plugin.h
SOURCES += form.cpp \
main.cpp \
../AnalogWidgets/analogwidgets/code/wallclock.cpp \
../AnalogWidgets/analogwidgets/code/widgetwithbackground.cpp \
../AnalogWidgets/analogwidgets/code/led.cpp \
../AnalogWidgets/analogwidgets/plugins/wallclock_plugin.cpp \
../AnalogWidgets/analogwidgets/plugins/led_plugin.cpp
FORMS += \
form.ui
To copy to clipboard, switch view to plain text mode
If I delete ../AnalogWidgets/analogwidgets/analogwidgets/widgetwithbackground.h \ i have :
../AnalogWidgets/analogwidgets/code/widgetwithbackground.cpp:26: undefined reference to `vtable for WidgetWithBackground'
../AnalogWidgets/analogwidgets/code/widgetwithbackground.cpp:26: undefined reference to `vtable for WidgetWithBackground'
../AnalogWidgets/analogwidgets/code/widgetwithbackground.cpp:26: undefined reference to `vtable for WidgetWithBackground'
../AnalogWidgets/analogwidgets/code/widgetwithbackground.cpp:26: undefined reference to `vtable for WidgetWithBackground'
debug/widgetwithbackground.o: In function `~WidgetWithBackground':
../AnalogWidgets/analogwidgets/code/widgetwithbackground.cpp:32: undefined reference to `vtable for WidgetWithBackground'
../AnalogWidgets/analogwidgets/code/widgetwithbackground.cpp:32: more undefined references to `vtable for WidgetWithBackground' follow
plug1-build-desktop/debug/moc_wallclock.cpp:89: undefined reference to `WidgetWithBackground::qt_metacast(char const*)'
plug1-build-desktop/debug/moc_wallclock.cpp:94: undefined reference to `WidgetWithBackground::qt_metacall(QMetaObject::Ca ll, int, void**)'
debug/moc_wallclock.o:moc_wallclock.cpp
.rdata+0x0): undefined reference to `WidgetWithBackground::staticMetaObject'
plug1-build-desktop/debug/moc_led.cpp:71: undefined reference to `WidgetWithBackground::qt_metacast(char const*)'
plug1-build-desktop/debug/moc_led.cpp:76: undefined reference to `WidgetWithBackground::qt_metacall(QMetaObject::Ca ll, int, void**)'
debug/moc_led.o:moc_led.cpp
.rdata+0x0): undefined reference to `WidgetWithBackground::staticMetaObject'
collect2: ld returned 1 exit status
( This file is used by led.h and wallclock.h (#include "widgetwithbackground.h"))
Bookmarks