QAbstractItemModel

  • Lors de l'insertion (avec beginInsertRows()), les éléments insérés ne doivent pas contenir de sous éléments (rowCount() == 0) sous peine de causer des plantages.
  • Un model de donnée interne, pouvant être utilisé avec QAbstractItemModel pour afficher une arborescence et étant capable de se rafraîchir à la lecture d'un fichier, se trouve dans les fichiers filecontentstructure.cpp et filecontentstructure.h

CMake et Qt

Compilation d'une librairie static

add_definitions(-DQT_SHARED)
add_library(xinxplugins STATIC ${xinxplugins_SRCS} ${xinxplugins_MOC_SRCS})

Compilation d'un plugin

dynamique
add_definitions(${QT_DEFINITIONS})
add_definitions(-DQT_PLUGIN)
add_definitions(-DQT_NO_DEBUG)
add_definitions(-DQT_SHARED)
add_library(webplugin SHARED ${webplugin_SRCS} ${webplugin_MOC_SRCS})
static
?

Compilation de fichier RC pour Windows

if(WIN32)
       add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xinx_ico.obj
               COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/xinx_ico.obj -i${CMAKE_CURRENT_SOURCE_DIR}/${xinx_RCS}
       )
       set(xinx_RESS ${CMAKE_CURRENT_BINARY_DIR}/xinx_ico.obj)
endif(WIN32)