File tree Expand file tree Collapse file tree 8 files changed +88
-223
lines changed Expand file tree Collapse file tree 8 files changed +88
-223
lines changed Original file line number Diff line number Diff line change 11* .pro.user
2+ build
3+ .cache
Original file line number Diff line number Diff line change 1+ project (qt-material-widgets)
2+ cmake_minimum_required (VERSION 3.22)
3+
4+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
5+ add_subdirectory (examples)
6+ add_subdirectory (components)
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.5)
2+
3+ project (
4+ components
5+ VERSION 0.1
6+ LANGUAGES CXX)
7+
8+ set (CMAKE_INCLUDE_CURRENT_DIR ON )
9+
10+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
11+ set (CMAKE_AUTOUIC ON )
12+ set (CMAKE_AUTOMOC ON )
13+ set (CMAKE_AUTORCC ON )
14+
15+ set (CMAKE_CXX_STANDARD 17)
16+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
17+
18+ find_package (Qt5 REQUIRED COMPONENTS Core)
19+ find_package (Qt5 REQUIRED COMPONENTS Widgets)
20+
21+ file (GLOB THELIB "lib/*" )
22+ file (GLOB LAYOUT "layouts/*" )
23+ file (GLOB COMPONENTSHEADER "*.h" )
24+ file (GLOB COMPONENTSSOURCE "*.cpp" )
25+ set (RCC_FILES resources.qrc)
26+ add_library (${PROJECT_NAME} STATIC ${THELIB} ${LAYOUT} ${COMPONENTSHEADER}
27+ ${COMPONENTSSOURCE} ${RCC_FILES} )
28+ target_link_libraries (${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Widgets)
29+
30+ target_link_directories (${PROJECT_NAME} PUBLIC .)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ void QtMaterialAvatar::paintEvent(QPaintEvent *event)
234234 painter.setRenderHint (QPainter::Antialiasing);
235235
236236 QRect r = rect ();
237- const qreal hs = d->size /2 ;
237+ const qreal hs = d->size /2.0 ;
238238
239239 if (!isEnabled ())
240240 {
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.5)
2+
3+ project (examples VERSION 0.1 LANGUAGES CXX)
4+
5+ set (CMAKE_INCLUDE_CURRENT_DIR ON )
6+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
7+
8+ set (CMAKE_AUTOUIC ON )
9+ set (CMAKE_AUTOMOC ON )
10+ set (CMAKE_AUTORCC ON )
11+ set (CMAKE_CXX_STANDARD 17)
12+
13+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
14+
15+ find_package (QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
16+ find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
17+
18+ file (GLOB HEADER "*.h" )
19+ file (GLOB RSOURCE "*.cpp" )
20+ file (GLOB UI "*.ui" )
21+
22+ SET (RCC_FILES examples.qrc)
23+
24+ add_executable (
25+ ${PROJECT_NAME}
26+ ${HEADER}
27+ ${RSOURCE}
28+ ${UI}
29+ ${RCC_FILES}
30+ )
31+ target_include_directories (${PROJECT_NAME} PUBLIC
32+ ../components/
33+ )
34+
35+ target_link_libraries (
36+ ${PROJECT_NAME} PRIVATE
37+ Qt${QT_VERSION_MAJOR} ::Widgets
38+ Qt${QT_VERSION_MAJOR} ::Core
39+ components
40+ )
41+
42+ set_target_properties (${PROJECT_NAME} PROPERTIES
43+ MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
44+ MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
45+ MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR} .${PROJECT_VERSION_MINOR}
46+ MACOSX_BUNDLE TRUE
47+
48+ )
49+
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments