I am trying to create unit testing for my project but struggle with costumn widgets.
While compiling the test unit, ui_mainwindow.h
cannot find my widget.h
anymore.
My project structure looks like this:
Project
scr
scr.pro
scr.pri
mainwindow.ui
CostumnWidgets
widget.h
test
test.pro
In Qt-Designer i refer to my widget with ./CostumnWidgets/widget.h
scr.pri
QT += core gui
TEMPLATE = app
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
SOURCES += $$PWD/mainwindow.cpp \
$$PWD/CostumnWidgets/widget.cpp
HEADERS += $$PWD/mainwindow.h \
$$PWD/CostumnWidgets/widget.h
FORMS += $$PWD/mainwindow.ui
test.pro
TARGET = Test
include(../scr/scr.pri)
QT += widgets
QT += testlib
SOURCES += $$PWD/test.cpp
How can I solve that without making a copy of my CostumnWidget-folder to my test directory? Thank you!