上一话题

Widget 中的键盘焦点

下一话题

一般后端

Qt Widget 画廊

Qt widgets shown in different styles on various platforms.

Qt’s support for widget styles and themes enables your application to fit in with the native desktop environment.

The widgets examples show how some of the widgets available in Qt might appear when configured to use the a particular style. Each style is only available on the respective platfom, and provides native look and feel by integrating to the platform theme. Thus, the final appearance varies depending on the active theme.

The Windows style (“windows”) is provided by QWindowsStyle.

../_images/windows-style.png
../_images/windows-vista-style.png

The Windows Vista style (“windowsvista”) is provided by QWindowsVistaStyle.

The macOS style (“macintosh”) is provided by QMacStyle.

../_images/macos-style.png
../_images/fusion-style.png

The Fusion style (“fusion”) is provided by QFusionStyle.

The Styles example displays the following widgets:

The Calendar Widget example displays some additional widgets, here run on Windows 10 and macOS:

../_images/windows-style2.png ../_images/macos-style2.png
  • QGroupBox (1) provides a group box frame with a title.

  • QCalendarWidget (2) provides a monthly calendar widget that can be used to select dates.

  • QLabel (3) provides a text or image display.

  • QDateEdit (4) provides a widget for editing dates.

  • QComboBox (5) provides a combined button and pop-up list.