adding qt resources

This commit is contained in:
dushyant basson
2023-09-01 14:58:18 +05:30
committed by Thomas Krijnen
parent ef87f0fe74
commit 07eecad433
7 changed files with 39 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"compile_flags": [
"-I/opt/homebrew/Cellar/qt/6.5.1_2/include"
]
}
Executable
+15
View File
@@ -0,0 +1,15 @@
cmake ../cmake \
-DPYTHON_EXECUTABLE=/opt/homebrew/bin/python3 \
-DPYTHON_LIBRARY=/opt/homebrew/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib \
-DPYTHON_INCLUDE_DIR=/opt/homebrew/Frameworks/Python.framework/Versions/3.11/include/python3.11/ \
-DOCC_LIBRARY_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_1/lib/ \
-DOCC_INCLUDE_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_1/include/opencascade/ \
-DCGAL_INCLUDE_DIR=/opt/homebrew/include/ \
-DGMP_LIBRARY_DIR=/opt/homebrew/lib/ \
-DMPFR_LIBRARY_DIR=/opt/homebrew/lib/ \
-DHDF5_LIBRARY_DIR=/opt/homebrew/lib/ \
-DHDF5_INCLUDE_DIR=/opt/homebrew/include/ \
-DCOLLADA_SUPPORT=OFF \
-DBUILD_QTVIEWER=ON \
-DQT_DIR=/opt/homebrew/Cellar/qt/6.5.1_2 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=true
+9 -1
View File
@@ -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}")
+4
View File
@@ -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

+6
View File
@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>ifcopenshell_logo.png</file>
<file>ifcopenshell_logo.ico</file>
</qresource>
</RCC>