Externaliser les fichiers ui
Bonjour,
J'aimerai utiliser Qt Designer pour me faciliter la vie et pour cela je créé mes fenêtres dans QtDesigner.
En parallèle, j'ai mon code développé à côté où j'utilise un fichier CMakeFile pour construire le projet.
J'aimerais donc intégrer les 3 fichiers .h, .cpp, .ui au code après en avoir fini avec qtDesigner.
Je copie donc mes fichiers dans ma structure où je met mon .h et mon .ui dans mon dossier includes et mon .cpp dans mon dossier src.
J'active bien l'option CMAKE_AUTOUIC dans le fichier CMakeFiles.
Je compile avec la commande "make", et là j'ai un message d'erreur qui est le suivant:
Code:
1 2 3 4 5 6
| AUTOUIC: error: process for ui_dialog.h needed by
"/home/riffet/Developpement/Dyname3/branches/170117_JR_work/IHM/src/docks/animation/dialog.cpp"
failed:
File '/home/riffet/Developpement/Dyname3/branches/170117_JR_work/IHM/src/docks/animation/dialog.ui' is not valid
uic failed... |
Je précise les fichiers dialog sont ceux de base quand on ouvre une nouvelle classe d'interface graphique QtDesigner.
Je vous met le code du fichier CMakeLists, on sait jamais:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| #IHMProject
project(Dyname_IHM)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/engine/engine/include)
include_directories(${CMAKE_SOURCE_DIR}/engine/topo_geo_model/topology/include)
include_directories(${CMAKE_SOURCE_DIR}/engine/dataFlux/include)
file(GLOB_RECURSE SRC_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
QT5_WRAP_CPP(manager_moc ${Qt_HEADERS_MOC})
set(IHM_NAME "Dyname-IHM")
add_executable(${IHM_NAME} ${SRC_SOURCES})
target_link_libraries(${IHM_NAME} ${CMAKE_BINARY_DIR}/lib/libengine.a)
target_link_libraries(${IHM_NAME} ${QT_LIBRARIES})
target_link_libraries(${IHM_NAME} ${MOKA_LIBRARIES})
target_link_libraries(${IHM_NAME} ${GMP_LIBRARIES})
target_link_libraries(${IHM_NAME} ${CGAL_LIBRARIES})
target_link_libraries(${IHM_NAME} ${GMS_C++_LIBRARIES})
target_link_libraries(${IHM_NAME} ${GMS_LIBRARIES})
target_link_libraries(${IHM_NAME} ${TINYXML2_LIBRARIES})
target_link_libraries(${IHM_NAME} ${ZLIB_LIBRARIES})
target_link_libraries(${IHM_NAME} ${NEWMAT_LIBRARIES})
target_link_libraries(${IHM_NAME} ${ASSIMP_LIBRARIES})
qt5_use_modules(${IHM_NAME} Widgets Core OpenGL Gui Concurrent) |
Attention la partie grise n'est pas en commentaire, juste le format code qui a vu une étoile et gris la partie de fin.
Auriez-vous une idée?
Je vous remercie d'avance,
Jérémy