[QT Programming Series-11]: C++ Graphical User Interface Programming, QT Framework Quick Start Training - 5- QT Main Controls and Custom Controls

Table of contents

5. QT main controls

5.1 Predefined controls

5.2 Custom controls

5.3 Using predefined container oranges and promoting custom controls

5.3 Postscript


5. QT main controls

5.1 Predefined controls

In Qt, there are many predefined controls (Widgets) that can be used to create user interfaces. These controls provide various common user interface elements such as buttons, text boxes, list boxes, and so on. Here are some common predefined controls:

  1. QPushButton: Button control, used to trigger operations or events.

  2. QLabel: Label control, used to display text or image.

  3. QLineEdit: A single-line text box control for receiving text entered by the user.

  4. QTextEdit: Multi-line text box control, used to receive and display multi-line text.

  5. QRadioButton: Radio button control, used for radio selection of options.

  6. QCheckBox: Check box control, used for multiple selection of options.

  7. QComboBox: Combo box control, used to select an option or enter a new option.

  8. QListWidget/QTreeWidget: Listbox/treebox controls for displaying and managing item lists.

  9. QSlider/QDial: slider/knob control, used to adjust the value or range.

  10. QProgressBar: A progress bar control used to indicate the progress of a task.

  11. QSpinBox/QDoubleSpinBox: Numerical input box control, used to receive numerical input.

  12. QCalendarWidget: A calendar control for displaying and selecting dates.

In addition to these basic controls, Qt also provides more advanced and customized controls, such as QTableView, QListView, QGraphicsView, etc., to meet different types and complex user interface needs.

These predefined controls can be quickly laid out and designed by dragging and dropping controls onto the interface in Qt Designer, or manually created and operated through code. These controls can be customized and interacted with by setting different properties and signal slots.

In short, Qt's predefined controls provide a wide range of easy-to-use tools for developers to quickly build various types of user interfaces.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5.2 Custom controls

 

 

 

 

 

 

 

5.3 Using predefined container oranges and promoting custom controls

 

 

 

 

 

 

 

5.3 Postscript

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/HiWangWenBing/article/details/131621443