mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
adding qt resources
This commit is contained in:
committed by
Thomas Krijnen
parent
ef87f0fe74
commit
07eecad433
@@ -33,6 +33,13 @@ endif()
|
||||
|
||||
set(targetName "QtViewer")
|
||||
|
||||
# Scan for .qrc files and add to build process
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(RESOURCE_FILES
|
||||
resources/qt_resources.qrc
|
||||
)
|
||||
|
||||
add_executable(${targetName}
|
||||
IfcViewerWidget.h
|
||||
IfcViewerWidget.cpp
|
||||
@@ -47,6 +54,7 @@ set_target_properties(${targetName} PROPERTIES
|
||||
AUTOMOC On
|
||||
WIN32_EXECUTABLE ON
|
||||
MACOSX_BUNDLE ON
|
||||
RESOURCE "${RESOURCE_FILES}"
|
||||
)
|
||||
|
||||
target_link_libraries(${targetName}
|
||||
@@ -64,4 +72,4 @@ target_include_directories(${targetName} PUBLIC
|
||||
)
|
||||
|
||||
get_target_property(targetIncludeDirs ${targetName} INCLUDE_DIRECTORIES)
|
||||
message(STATUS "target_include_directories: ${targetIncludeDirs}")
|
||||
message(STATUS "target_include_directories: ${targetIncludeDirs}")
|
||||
|
||||
@@ -6,7 +6,11 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QIcon appIcon(":/resources/ifcopenshell_logo.png");
|
||||
|
||||
MainWindow window;
|
||||
|
||||
window.setWindowIcon(appIcon);
|
||||
window.show();
|
||||
|
||||
return app.exec();
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>ifcopenshell_logo.png</file>
|
||||
<file>ifcopenshell_logo.ico</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Reference in New Issue
Block a user