Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Assets/icon_logo.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource prefix="/">
<file alias="spqr_logo.png">spqr_logo.png</file>
</qresource>
</RCC>
Binary file added Assets/spqr_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 "")
Expand Down Expand Up @@ -294,4 +296,4 @@ if(BUILD_PYTHON_BINDINGS AND BINDINGS_SRC)
)
endif()

# ===============================================================================================
# ===============================================================================================
4 changes: 4 additions & 0 deletions Src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Loading