返回介绍

Pictures of Most Qt Widgets

发布于 2019-10-04 14:57:27 字数 3341 浏览 1032 评论 0 收藏 0

Most of these widgets are shown in either Motif or Windows style. All widgets are supported in both styles (and other styles), but for clarity we just present a selection.

Below we have three views seperated by QSplitters. At the top-left there's a QListBox, at the top-right there's a QListView with a QHeader and two QScrollBars. And at the bottom there's a QIconView.

Below we present a QMainWindow which has a QMenuBar and some QToolBars that contain various widgets, e.g. QToolButtons and QComboBoxes. The central widget is a QWorkspace which is used for MDI window management and which contains an MDI-Window featuring a QTextEdit. At the bottom you see a QStatusBar and at the bottom-right a QSizeGrip.

The image below shows a QFileDialog. On the Macintosh and Windows platforms you can either use a QFileDialog or the native file dialog. This is explained in the QFileDialog class documentation.

Below is a QPrintDialog. On Macintosh and Windows the native print dialog is used, but for other platforms we provide QPrintDialog. Use QPrinter::setup() for portability instead of the QPrintDialog if you need to be platform independent.

Below is a QFontDialog.

Windows

The screenshot below shows a QColorDialog.

Messages are presented using QMessageBoxes, as shown below.

The image below shows a QProgressDialog. The QProgressBar can also be used as a separate widget.

In the screenshot below we have a QGroupBox that contains a QLineEdit, a read-only QComboBox and an editable QComboBox.

The screenshot below shows a QPopupMenu.

In the screenshot below there's a QButtonGroup containing four QRadioButtons and two QCheckBoxes.

The screenshot below shows a QTabDialog. The tabs (QTabBar) or the more convenient class QTabWidget, which combines a tab bar with the pages, can be used separately. In the visible page you see a QLabel, the range controls QSlider and QSpinBox and below a QLCDNumber. In the bottom row there are some QPushButtons.

In the screenshot below there's a QTextBrowser displaying a HTML page. See also QTextEdit.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文