[Qt-interest] more qmake woes ... touching A.ui compiles ui_A.h but not A.cpp

Kustaa Nyholm Kustaa.Nyholm at planmeca.com
Fri May 28 10:57:22 CEST 2010


Hi,

I don't know if this is related to my earlier post this morning or not,
but I have a small qmake (sub) project (.pro file included verbatim at
bottom), and if I 'touch' any of the .ui files the corresponding ui_.h file
gets re-generated by uic but the .cpp file does not get compiled.

I have a larger project where the .pro file has similar .ui/.h/.cpp triplets
defined in similar way using the FORMS/HEADERS/SOURCE statements and
in that project touching any of the .ui files triggers both the uic and
g++ for the .ui and .cpp files, as expected.

So what could be the matter with my non working project?

The only difference that I see apart from the actual files source files is
that the working project has:

TEMPLATE = lib
CONFIG += plugin 

but the non functioning has:

TEMPLATE = lib
CONFIG += staticlib


So the working one produces a dynamic library and the non working one
produces a static library.

I'm probably doing something stupid but can't spot it.

br Kusti




nonworking.pro
--------------------------------------------------

TEMPLATE = lib
CONFIG += staticlib
QT += network xml

DESTDIR = ../../bin/servicemodes
RCC_DIR = ../../build
MOC_DIR = ../build
OBJECTS_DIR = ../build
UI_HEADERS_DIR = ../build
win32 { 
    RCC_DIR = ../build_win
    MOC_DIR = ../build_win
    OBJECTS_DIR = ../build_win
    UI_HEADERS_DIR = ../build_win
}
INCLUDEPATH += ../main/
INCLUDEPATH += ../../PlanGuiApi/include/
INCLUDEPATH += ../widgets/PlanRegularButton/

HEADERS = \
    calibrationpane.h \
    outputpane.h \
    inputpane.h \
    mycustomwidget.h \

SOURCES = \
    calibrationpane.cpp \
    outputpane.cpp \
    inputpane.cpp \
    mycustomwidget.cpp \

FORMS +=  \
    calibrationpane.ui \
    outputpane.ui \
    inputpane.ui \

    
OTHER_FILES += 
RESOURCES += servicemodeResources.qrc

CONFIG += qt debug





More information about the Qt-interest-old mailing list