Customwidgets
authors: amireza007 layout: post title: Custom Widgets in Qt date: ‘2024-09-03 17:45 +0330’ categories: [Software Development] tags: [Qt, Gui, UI Design, Qt Designer] —
In this, I’ll be writing about the things I’ve learned during implementing the UI of MDSAGV with the help of Custom widgets.
Useful Links:
- https://doc.qt.io/qt-6/designer-creating-custom-widgets.html
- For distinguishing between Qt plugin and Widget: this
- This one is useful for general Qt, providing all Macros used in custom classes. This
- an example of custom plugin
- qt_add_plugin
Did you know you can start
Qt-Creatorfrom Command Line. You can use this to set custom plugin paths for qt designer plugin in qt creator.1
\path\to\qt\installation_Directory\Tools\QtCreator\bin\qtcreator.exe -h
- For adding the ui file to a class and
.hfile in the project directory, You kneed to promote the plugin/custom widget inQT-Designerto that class
Useful Videos:
Useful Tricks
- Use
<alt><shift>rto view your widget’s[preview], kinda works likeQml Live. - for using
_sstring formats, see this https://doc.qt.io/qt-6/qt-literals-stringliterals.html
Recipe for making custom widgets:
This post is licensed under CC BY 4.0 by the author.