summaryrefslogtreecommitdiffstats
path: root/examples/sql/books/CMakeLists.txt
diff options
context:
space:
mode:
authorEd Cooke <ed.cooke@qt.io>2023-11-01 14:18:14 +0100
committerEd Cooke <ed.cooke@qt.io>2023-12-14 20:06:32 +0100
commit76b2852b7cff183ba31d6b09b00cbabdffb9ba71 (patch)
tree0b50dedd8cd9c9631f9ca41c343406390a6c221f /examples/sql/books/CMakeLists.txt
parent33254fb41f29b510d3d74dbaab60f0a67ef56d46 (diff)
Update the books example
Remove the .ui file and write the equivalent implementation. Replace the outdated star icons with new star icons. 5 empty stars are now provided and filled in depending on the rating. The new stars are SVG, however, we do not use an SvgRenderer as we cannot use the QtSvg API from QtBase directly. It is safe to assume the SVG image loading plugin is present, the worst case scenario would be empty icons, but it would still build. We instead use QIcon. For the rating, draw the star icons in a combobox, replacing the old spinbox. Update the layout by moving the table view to the bottom, and arranging the input fields at the top. The scrollbar policies have been set to Qt::ScrollBarAsNeeded for the table view. Fixes: QTBUG-118476 Pick-to: 6.7 6.6 6.5 Change-Id: I27c13534ab06e17531d155469a1cc6e7e05197af Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'examples/sql/books/CMakeLists.txt')
-rw-r--r--examples/sql/books/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/sql/books/CMakeLists.txt b/examples/sql/books/CMakeLists.txt
index 86ca051c3b..36e6dca9e3 100644
--- a/examples/sql/books/CMakeLists.txt
+++ b/examples/sql/books/CMakeLists.txt
@@ -16,7 +16,7 @@ qt_standard_project_setup()
qt_add_executable(books
bookdelegate.cpp bookdelegate.h
- bookwindow.cpp bookwindow.h bookwindow.ui
+ bookwindow.cpp bookwindow.h
initdb.h
main.cpp
)
@@ -35,7 +35,8 @@ target_link_libraries(books PRIVATE
# Resources:
set(books_resource_files
- "images/star.png"
+ "images/star.svg"
+ "images/star-filled.svg"
)
qt_add_resources(books "books"