message(${filepath} "\\t" ${CMAKE_CURRENT_SOURCE_DIR}) string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" filename ${filepath}) #.+/(.+)\\\..*" "\\\1 list(APPEND QML_FILES ${filename}) endforeach(filepath) list(REMOVE_DUPLICATES QML_FILES) #表示删除非第一个重名值 ### ...
//main.qmlimportQtQuickimport"qml"Window{width:640height:480visible:truetitle:qsTr("Hello World")ImageViewer{anchors.fill:parent;visible:true}}//qml/ImageViewer.qmlimportQtQuick2.0Image{id:aasource:Qt.resolvedUrl("img/abc.png")//相对位置,官网blog说cmake会自动添加,但是没有onVisibleChanged:console...