diff --git a/Assets/icon_logo.qrc b/Assets/icon_logo.qrc new file mode 100644 index 0000000..2cef175 --- /dev/null +++ b/Assets/icon_logo.qrc @@ -0,0 +1,6 @@ + + + + spqr_logo.png + + diff --git a/Assets/spqr_logo.png b/Assets/spqr_logo.png new file mode 100644 index 0000000..d1142c1 Binary files /dev/null and b/Assets/spqr_logo.png differ diff --git a/CMakeLists.txt b/CMakeLists.txt index 696744f..68adaae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,6 +121,7 @@ endif() # -------------------- Collect sources and split into: core, main, bindings set(_src_dir "${CMAKE_SOURCE_DIR}/Src") set(_include_dir "${CMAKE_SOURCE_DIR}/Include") +set(_assets_dir "${CMAKE_SOURCE_DIR}/Assets") # Source files file(GLOB_RECURSE SOURCES ${_src_dir}/*.cpp) @@ -134,6 +135,7 @@ file(GLOB_RECURSE HEADERS CONFIGURE_DEPENDS # Optional Qt UI and resource files (AUTOUIC/AUTORCC will process these) file(GLOB_RECURSE ALL_UIS CONFIGURE_DEPENDS "${_src_dir}/*.ui") file(GLOB_RECURSE ALL_QRCS CONFIGURE_DEPENDS "${_src_dir}/*.qrc") +file(GLOB_RECURSE ALL_QRCS CONFIGURE_DEPENDS "${_assets_dir}/*.qrc") # Identify entry points we don't want in the core lib set(MAIN_SRC "") @@ -294,4 +296,4 @@ if(BUILD_PYTHON_BINDINGS AND BINDINGS_SRC) ) endif() -# =============================================================================================== \ No newline at end of file +# =============================================================================================== diff --git a/Src/main.cpp b/Src/main.cpp index 9b4b687..29dc080 100644 --- a/Src/main.cpp +++ b/Src/main.cpp @@ -8,9 +8,13 @@ int main(int argc, char** argv) { spqr::CircusApplication app(argc, argv); app.setApplicationName(spqr::appName); + Q_INIT_RESOURCE(icon_logo); + QIcon icon(":/spqr_logo.png"); + app.setWindowIcon(icon); spqr::AppWindow window(argc, argv); window.show(); + window.setWindowIcon(icon); return app.exec(); }