所有 Qt 范例

Active Qt

COM App 范例 (ActiveQt)

The COM App example shows how to use ActiveQt to develop a Qt application that can be automated via COM. Different QObject based classes are exposed as COM objects that communicate with the GUI of the running Qt application. The APIs of those COM objects has been designed to resemble the APIs of standard COM applications; i.e. those from Microsoft Office.

层次结构范例 (ActiveQt)

The Hierarchy example is shows how to write an in-process ActiveX control. The control is a QWidget subclass with child widgets that are accessible as sub-types.

菜单范例 (ActiveQt)

The Menus example demonstrates the use of QMenuBar and QStatusBar in a QMainWindow to implement an in-place active control.

多个范例 (ActiveQt)

The Multiple example demonstrates the implementation of a QAxFactory to provide multiple ActiveX controls in a single in process ActiveX server using the QAXFACTORY_EXPORT() macro. The ActiveX controls in this example are simple QWidget subclasses that reimplement QWidget::paintEvent().

OpenGL 范例 (ActiveQt)

The OpenGL example demonstrates the use of the default factory and QAxFactory::isServer(), and the implementation of an additional COM interface using QAxBindable and QAxAggregated. The server executable can run both as an ActiveX server and as a stand-alone application.

Outlook 范例 (ActiveQt)

The Qutlook example demonstrates the use of ActiveQt to automate Outlook. The example makes use of the dumpcpp tool to generate a C++ namespace for the type library describing the Outlook Object Model.

简单范例 (ActiveQt)

The Simple example demonstrates the use of QAxBindable and QAxFactory.

Web Browser Example (ActiveQt)

The Web Browser example uses the Microsoft Web Browser ActiveX control to implement a fully functional Web Browser application. The user interface has been developed using the Qt Designer integration of the QAxWidget class.

包裹器范例 (ActiveQt)

The Wrapper example demonstrates how to export existing QWidget classes as ActiveX controls, and the use of QAxFactory together with the QAXFACTORY_EXPORT() macro. ActiveX controls in this example are the standard button classes QPushButton, QCheckBox and QRadioButton as provided by Qt.

Qt 3D

Qt 3D: Advanced custom material QML Example

演示在 Qt3D 中创建高级材质

Qt 3D:音频可视化器范例

演示组合 Qt 3D 渲染和 Qt Quick 2 元素。

Qt 3D:基本形状 C++ 范例

展示由 Qt 3D 提供的 4 个基本形状,并为每个形状设置网格。

Qt 3D:多视口 QML 范例

QML 范例演示从多个视口渲染场景图形。

Qt 3D:PBR 材质 QML 范例

QML 应用程序演示使用 PBR 材质。

Qt 3D:行星 QML 范例

演示组合 Qt 3D 渲染和 Qt Quick 2 元素。

Qt 3D:Scene2D QML 范例

QML 应用程序演示在 Qt 3D 场景中使用 Qt Quick 2

Qt 3D:Scene3D QML 范例

QML 应用程序演示可视化 3D 场景。

Qt 3D:Scene3D QML 带 Widget 的范例

基于 QWidget 的应用程序采用 QML 场景包含 3D 场景。

Qt 3D:阴影贴图 QML 范例

Qt 3D QML 应用程序说明如何在带阴影的 Qt 3D 中渲染场景。

Qt 3D:简单 C++ 范例

演示如何在 Qt 3D 渲染场景的 C++ 应用程序。

Qt 3D:简单 QML 范例

QML 应用程序演示如何在 Qt 3D 中渲染场景。

Qt 3D: Simple custom material QML Example

Demonstrates creating a custom material in Qt3D

Qt 3D:波形 QML 范例

QML 应用程序演示如何使用顶点着色器和几何着色器。

Qt 3D:线框 QML 范例

Qt 3D QML 应用程序实现单通线框渲染方法。

Qt Android Extras

Qt Notifier

Demonstrates calling Java code from an Android application.

Qt Assistant 手册

远程控制范例

使用和控制 Qt Assistant 作为帮助查看器。

简单文本查看器范例

Using Qt Assistant as a customized help viewer for your application.

Qt Bluetooth

蓝牙聊天范例

范例展示透过蓝牙进行通信。

蓝牙文件传输范例

An example showing the use of Bluetooth Object Push Profile (OPP).

Bluetooth Low Energy Heart Rate Game

A game demonstrating the interaction with a Bluetooth Low Energy Heart Rate device/service.

Bluetooth Low Energy Heart Rate Server Example

An example demonstrating how to set up and advertise a GATT service. The example demonstrates the use of the Qt Bluetooth Low Energy classes related to peripheral (slave) functionality.

Bluetooth Low Energy Scanner Example

An application designed to browse the content of Bluetooth Low Energy peripheral devices. The example demonstrates the use of all Qt Bluetooth Low Energy classes.

Bluetooth QML Chat Example

An example demonstrating communication through Bluetooth QML API.

Bluetooth QML Ping Pong example

A QML example showing Bluetooth communication.

Bluetooth Scanner Example

An example showing how to locate Bluetooth devices.

QML Bluetooth Picture Push Example

An example showing the use Bluetooth Object Push Profile (OPP).

QML Bluetooth Scanner Example

A QML example about locating Bluetooth devices.

Qt Canvas 3D

Framebuffer Example

Render into a framebuffer and use it as a texture

Interaction Example

Interact with an object in canvas using Qt Quick Controls

Interactive Mobile Phone Example

Demonstrates using Qt Quick item as a texture with three.js.

JSON Models Example

Load and display several JSON models

Lit and Textured Cube Example

A simple cube with texturing and lighting

One Qt Example

Demonstrates combining Qt Quick and three.js rendering.

Planets Example

Demonstrates combining Qt Quick and three.js rendering.

Qt Quick Item as Texture Example

A simple cube with a Qt Quick item as a texture

Qt Charts

AreaChart 范例

展示如何创建简单区域图表的范例。

音频范例

此范例展示动态数据 (麦克风输入) 的绘制。

BarChart 范例

展示如何创建条形图表的范例。

BarModelMapper Example

This example shows how to use QAbstractItemModel derived model as the data for the bar series.

Box and Whiskers Example

The example shows how to create a box-and-whiskers chart.

Callout Example

This example shows how to draw an additional element (a callout) on top of the chart.

Candlestick Chart Example

Shows how to create a candlestick chart.

Chart Themes Example

The example shows the look and feel of the different built-in themes.

Custom Chart Example

This example shows how to customize the appearance of the different elements on a chart.

DateTimeAxis Example

The example shows how to use QLineChart with QDateTimeAxis.

Donut Chart Breakdown Example

This example shows how to use create a donut breakdown chart using QPieSeries API.

Donutchart Example

This example shows how to create a simple donut chart, and do some customizations to a slice.

Dynamic Spline Example

This example shows how to draw dynamic data.

HorizontalBarChart Example

The example shows how to create a horizontal bar chart.

HorizontalPercentBarChart Example

The example shows how to create a simple horizontal percent bar chart.

HorizontalStackedBarChart Example

The example shows how to create a simple stacked horizontal bar chart.

Legend Example

This example shows how to detach the legend from the chart and how to attach it back.

LegendMarkers Example

The example shows how to make use of legend markers.

Line and BarChart Example

The example shows how to combine different charts and set the axes.

LineChart Example

The example shows how to create a simple line chart.

Logarithmic Axis Example

The example shows how to use QLogValueAxis.

Model Data Example

This example shows how to use the QAbstractItemModel derived model as the data for the series.

Multiple Axes Example

The example shows how to create a simple chart with two vertical axes. One for each series.

Nested Donuts Example

This example shows how to create a nested donuts chart using the QPieSeries API.

OpenGL Accelerated Series Example

The example shows how to enable OpenGL acceleration for QLineSeries and QScatterSeries.

PercentBarChart Example

The example shows how to create a simple percent bar chart.

Pie Chart Customization Example

This example shows how the look and feel of a pie chart can be customized.

Piechart Drilldown Example

The example shows how to implement a piechart with drilldown effect.

Piechart Example

The example shows how to create a simple pie chart and do some customizations to a pie slice.

Polar Chart Example

The example shows how to create a simple polar chart with multiple different series.

Qml Axes

This is a demonstration of how to use axes in your QML application.

Qml Charts Example

This basic demonstration shows how to use the different chart types by using qml.

Qml Custom Legend

This example shows you how to create your own custom legend.

Qml Customizations

This application shows you how to customize different visual properties of a ChartView and series.

Qml F1 Legends

This application demonstrates how to use XmlListModel as a datasource for a Chart.

Qml Oscilloscope

The example shows how to implement application with strict performance requirements using the Qt Charts QML API.

Qml Polar Chart

This is a demonstration on how to use a polar chart in your QML application.

Qml Weather

This is a basic demonstration showing how to use the different chart types by using qml.

Scatter Interactions Example

This example shows how to create a simple scatter chart and how to interact with the chart.

ScatterChart Example

The example shows how to create a simple scatter chart.

SplineChart Example

The example shows how to create a simple spline chart.

StackedBarChart Drilldown Example

The example shows how to implement drilldown using a stacked barchart.

StackedBarChart Example

The example shows how to create a simple stacked bar chart.

Temperature Records Example

The example shows how to create a bar chart with negative bars.

Zoom Line Example

The example shows how to create your own custom zooming effect

Qt Concurrent

图像比例缩放范例

Demonstrates how to asynchronously scale images.

地图范例

演示如何同步比例缩放图像。

QtConcurrent 进度对话框范例

演示如何监视活动进程的进度。

QtConcurrent 单词计数范例

演示如何使用 map-reduce (映射缩减) 算法

运行函数范例

演示如何并发运行标准函数。

Qt Core

连续缓存范例

The Contiguous Cache example shows how to use QContiguousCache to manage memory usage for very large models. In some environments memory is limited and, even when it isn't, users still dislike an application using excessive memory. Using QContiguousCache to manage a list, rather than loading the entire list into memory, allows the application to limit the amount of memory it uses, regardless of the size of the data set it accesses

自定义类型范例

The Custom Type example shows how to integrate a custom type into Qt's meta-object system.

JSON 保存游戏范例

The JSON Save Game example demonstrates how to save and load a small game using QJsonDocument, QJsonObject and QJsonArray.

本地财富客户端范例

Demonstrates using QLocalSocket for a simple local service client.

本地财富服务器范例

Demonstrates using QLocalServer and QLocalSocket for serving a simple local service.

MIME 类型浏览器范例

Shows the hierarchy of MIME types and can be used to determine the MIME type of a file.

Mandelbrot 范例

The Mandelbrot example demonstrates multi-thread programming using Qt. It shows how to use a worker thread to perform heavy computations without blocking the main thread's event loop.

队列自定义类型范例

Demonstrates multi-thread programming using Qt

信号量范例

Demonstrates multi-thread programming using Qt

共享内存范例

Demonstrates doing inter-process communication using shared memory with the QSharedMemory class.

等待条件范例

Demonstrates multi-thread programming using Qt

Qt D-Bus

D-Bus 聊天范例

演示应用程序实例之间的通信。

D-Bus 复杂乒乓范例

演示 Qt D-Bus 类型系统的用法。

D-Bus 列表名称范例

演示如何访问 D-Bus 总线守护程序服务。

D-Bus 乒乓范例

演示使用 D-Bus 的简单消息系统。

D-Bus 远程控制车范例

展示如何使用 Qt D-Bus 从另一应用程序控制车。

Qt Data Visualization

Audiolevels 范例

展示实时音频数据的简单应用程序。

Axis Range Dragging With Labels Example

Implementing a custom input handler to support axis dragging.

条形范例

在 Widget 应用程序中使用 Q3DBars。

自定义输入范例

在 Widget 应用程序中实现自定义输入处理程序。

自定义项范例

将自定义项添加到表面图形。

自定义代理范例

使用 Q3DBars 采用自定义代理。

项模型范例

Using an item model as data source for Q3DBars.

Qt Quick 2 Axis Dragging Example

Implementing axis dragging in QML

Qt Quick 2 Axis Formatter Example

Example of a hybrid C++ and QML application demonstrating different axis formatters.

Qt Quick 2 Bars Example

Using Bars3D in a QML application.

Qt Quick 2 Custom Input Example

Customizing input in a QML application.

Qt Quick 2 Legend Example

Showing graph legend in a QML application.

Qt Quick 2 Multiple Graphs Example

Showing multiple graphs simultaneously in a QML application.

Qt Quick 2 Oscilloscope Example

Example of a hybrid C++ and QML application.

Qt Quick 2 Scatter Example

Using Scatter3D in a QML application.

Qt Quick 2 Spectrogram Example

Showing spectrogram graph in a QML application.

Qt Quick 2 Surface Example

Using Surface3D in a QML application.

Qt Quick 2 Surface Multiseries Example

Using multiple series with Surface3D in a QML application.

Rotations Example

Using rotated scatter items

Scatter Example

Using Q3DScatter in a widget application.

表面范例

在 Widget 应用程序中使用 Q3DSurface。

纹理表面范例

采用 Q3DSurface 使用纹理。

Volumetric rendering Example

Rendering volumetric objects.

Qt Designer 手册

计算器构建者范例

Creating a user interface from a Qt Designer form at run-time.

Calculator Form Example

Using a form created with Qt Designer in an application.

Container Extension Example

Creating a custom multi-page plugin for Qt Designer.

Custom Widget Plugin Example

Creating a custom widget plugin for Qt Designer.

Task Menu Extension Example

Creating a custom widget plugin for Qt Designer and providing custom task menu entries that are associated with the plugin.

World Time Clock Builder Example

Creating forms with Qt Designer that contain custom widgets that can be dynamically generated at run-time.

World Time Clock Plugin Example

Creating a custom widget plugin for Qt Designer that uses signals and slots.

Qt GUI

Analog Clock Window Example

The Analog Clock Window example shows how to draw the contents of a custom window.

OpenGL 窗口范例

This example shows how to create a minimal QWindow based application for the purpose of using OpenGL.

光栅窗口范例

This example shows how to create a minimal QWindow based application using QPainter for rendering.

Qt Gamepad

Qt Gamepad Configure Buttons Example

Enables configuring the gamepad buttons

Qt Gamepad Key Navigation Example

Demonstrates how to use navigation keys on the gamepad.

Qt Gamepad Mouse Item Example

Depicts joystick movement using a pointer.

Qt Gamepad Qt Quick Example

Demonstrates how to interact with the gamepad using QML.

Qt Gamepad Simple Example

A simple example demonstrating the APIs in use.

Qt Help

上下文大小写帮助范例

Using the QHelpEngineCore class to implement context-sensitive help for applications.

Qt Linguist 手册

Arrow Pad Example

Understanding the Qt Linguist contexts concept and using two or more languages.

Hello tr() Example

Translating a small Hello World program to Latin.

Troll Print Example

Updating translations for later releases.

Qt Location

地图查看器 (QML)

The Map Viewer example shows how to display and interact with a map, search for an address, and find driving directions.

Minimal Map (QML)

The minimum code to display a map using Qt Quick.

Places (QML)

The Places example demonstrates how to search for Places and access related content.

Places List (QML)

The Places List example demonstrates how to search for and display a list of places using a ListView.

地点地图 (QML)

The Places Map example demonstrates how to search for and display a list of places on a map using a MapItemView

Plane Spotter (QML)

The Plane Spotter example demonstrates the tight integration of location and positioning data types into QML

Qt Mac Extras

macOS Functions

Demonstrates using functions from the QtMac namespace.

macOS: Embedded QWindow

Demonstrates embedding a QWindow into an view hierarchy of a macOS application.

macOS: Pasteboard MIME Converter

Demonstrates using QMacPasteboardMime class.

Qt Multimedia

音频设备范例

Testing the available audio devices and their configuration.

音频输入范例

Recording audio using the QAudioInput class

音频输出范例

Enabling audio playback using the QAudioOutput class.

音频录制器范例

Discovering the available devices and supported codecs.

AudioEngine 范例

使用 Qt Audio Engine API 启用 3D 声音控制。

摄像头范例

摄像头范例展示如何使用 API 捕获静止图像或视频。

Declarative Radio Example

Demonstrates using the Radio QML type from Qt Multimedia.

媒体播放器范例

播放音频和视频。

QML 摄像头范例

摄像头范例展示如何使用 API 捕获静止图像或视频。

QML 视频范例

Transforming video and camera viewfinder content.

QML 视频着色器效果范例

Applying shader effects on video and camera viewfinder content.

Spectrum Example

Analyzing a raw audio stream using the FFTReal library.

视频图形项范例

在图形场景中的流式视频。

视频小部件范例

实现视频播放器 Widget。

Qt NFC

Annotated URL Example

An example showing reading from formatted NFC Data Exchange Format (NDEF) messages.

NDEF 编辑器范例

An example about reading and writing NFC Data Exchange Format (NDEF) messages to NFC Forum Tags.

QML CorkBoard Example

A QML example about displaying NFC Data Exchange Format (NDEF) messages.

QML Poster Example

A QML example about reading and displaying NFC Data Exchange Format (NDEF) messages.

Qt Network

阻塞 Fortune 客户端范例

Demonstrates how to create a client for a network service

广播接收器范例

演示如何接收,通过本地网络广播的信息。

广播发送器范例

演示如何把信息广播到本地网络中的多个客户端。

Fortune 客户端范例

Demonstrates how to create a client for a network service

Fortune 服务器范例

演示如何为网络服务创建服务器。

Google 建议范例

Obtains the list of search recommendations by the Google search engine

HTTP 范例

Demonstrates a simple HTTP client

回环范例

Demonstrates the client-server communication on a local host

多点播送接收器范例

Demonstrates how to receive information sent to a multicast group

多点播送发送器范例

Demonstrates how to send messages to a multicast group

网络聊天范例

Demonstrates a stateful peer-to-peer Chat client

网络下载范例

Demonstrates how to use networking APIs for multiple downloads

网络下载管理器范例

演示如何使用网络 API 进行多次下载

安全套接字客户端范例

演示如何通过加密 (SSL) 连接进行通信

线程化 Fortune 服务器范例

线程化 Fortune 服务器范例展示如何创建服务器,为使用线程处理来自不同客户端的请求的简单网络服务。它旨在与 Fortune 客户端范例一起运行。

Torrent Example

演示复杂 TCP/IP 操作

Qt Network Authorization

Reddit 范例

演示采用 OAuth 2 进行身份验证以访问 Reddit。

Twitter 时间线范例

Demonstrates authenticating with OAuth to access a Twitter timeline.

Qt OpenGL

2D 描绘范例

The 2D Painting example shows how QPainter and QGLWidget can be used together to display accelerated 2D graphics on supported hardware.

Cube OpenGL ES 2.0 example

The Cube OpenGL ES 2.0 example shows how to write mouse rotateable textured 3D cube using OpenGL ES 2.0 with Qt. It shows how to handle polygon geometries efficiently and how to write simple vertex and fragment shader for programmable graphics pipeline. In addition it shows how to use quaternions for representing 3D object orientation.

Hello GL2 范例

The Hello GL2 example demonstrates the basic use of the OpenGL-related classes provided with Qt.

纹理范例

The Textures example demonstrates the use of Qt's image classes as textures in applications that use both OpenGL and Qt to display graphics.

Qt Positioning

GeoFlickr (QML)

The GeoFlickr example shows how to use the user's current position to fetch local content from a web service.

Log File Position Source (C++)

The Logfile Position Source shows how to create and work with a custom NMEA position source, for platforms without GPS.

SatelliteInfo (C++/QML)

The SatelliteInfo example shows how the available satellites at the user's current position and marks the satellites currently contributing to the GPS fix as pink.

Weather Info (C++/QML)

The Weather Info example shows how to use the user's current position to retrieve local content from a web service in a C++ plugin for QML.

Qt Purchasing

Qt Purchasing Examples - QtHangman

QtHangman is an example that demonstrates how to use the Qt Purchasing API with Qt Quick.

Qt QML

C++ 扩展:网络访问管理器工厂范例

Implements a custom network access manager for the QML engine

扩展 QML - 添加类型范例

导出 C++ 类

扩展 QML - 附加特性范例

附加特性

扩展 QML - 绑定范例

Binding

扩展 QML - 默认特性范例

默认特性

扩展 QML - 扩展对象范例

扩展对象

扩展 QML - 分组特性范例

分组特性

扩展 QML - 继承与强制转换范例

C++ 继承和强制转换

扩展 QML - 方法范例

方法支持

扩展 QML - 对象和列表特性类型范例

导出 C++ 特性

扩展 QML - 特性值源范例

特性值源

扩展 QML - 信号支持范例

信号支持

QML 范例 - 动态场景

此范例演示创建动态组件。

QML 范例 - 国际化

这是国际化范例

QML 插件范例

This example creates a C++ plugin extension by subclassing QQmlExtensionPlugin.

Qt Quick 范例 - XMLHttpRequest

This is a collection of XMLHttpRequest examples

采用 C++ 编写 QML 扩展

Tutorial about extending QML with Qt C++.

Qt Quick

C++ 扩展:图像提供程序范例

How to load images in QML with QQuickImageProvider.

C++ Extensions: Image Response Provider Example

How to load images asynchronously in QML.

Models and Views: AbstractItemModel Example

Shows how to use a QAbstractItemModel subclass as a model in QML.

Models and Views: Object ListModel Example

Shows how to use a QList<QObject*> as a model in QML.

Models and Views: String ListModel Example

Shows how to use a QStringList as a model in QML.

QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks

QML Advanced Tutorial 2 - Populating the Game Canvas

QML Advanced Tutorial 3 - Implementing the Game Logic

QML Advanced Tutorial 4 - Finishing Touches

QML Dynamic View Ordering Tutorial 1 - A Simple ListView and Delegate

QML Dynamic View Ordering Tutorial 2 - Dragging View Items

QML Dynamic View Ordering Tutorial 3 - Moving Dragged Items

QML Dynamic View Ordering Tutorial 4 - Sorting Items

QQuickRenderControl Example

Shows how to render a Qt Quick scene into a texture that is then used by a non-Quick based OpenGL renderer

Qt Quick 演示 - Calqlatr

为肖象设备设计的 QML APP,它使用自定义组件、采用 AnimationController 动画化、并为应用程序逻辑编写 JavaScript。

Qt Quick 演示 - 时钟

演示使用 ListView 类型去显示由 ListModel 生成的数据,及使用 SpringAnimation 类型去动画图像的 QML 时钟应用程序。

Qt Quick Demo - Maroon in Trouble

A Qt Quick game for touch devices that uses SpriteSequence, ParticleSystem, Emitter, and Wander types to animate objects and the SoundEffect type to play sound effects.

Qt Quick 演示 - 照片表面

用于触摸设备的 QML 应用程序,使用具有 FolderListModel 的 Repeater 访问文件夹内容,使用包含 MouseArea 的 PinchArea 处理抓取内容的捏合手势。

Qt Quick 演示 - 照片查看器

A QML photo viewer that that uses XmlListModel and XmlRole to download Flickr feeds, and Package to display the photos in different views.

Qt Quick Demo - RSS News

A QML RSS news reader that uses XmlListModel and XmlRole to download XML data, ListModel and ListElement to create a category list, and ListView to display the data.

Qt Quick 演示 - 消方块游戏

Kuniaki Moribe 流行益智游戏的 QML 实现。

Qt Quick 演示 - StocQt

用于 NASDAQ-100 的可配置库存图表。

Qt Quick 演示 - 推特搜索

带 3D 效果的 Twitter 搜索客户端。

Qt Quick Examples - Accessibility

This example demonstrates the implementation of accessible buttons.

Qt Quick Examples - Animation

This is a collection of QML Animation examples.

Qt Quick 范例 - 画布

This is a collection of QML Canvas examples.

Qt Quick 范例 - 拖放

This is a collection of QML drag and drop examples

Qt Quick 范例 - 图像元素

This is a collection of QML examples relating to image types.

Qt Quick 范例 - 键交互

这是 QML 键盘交互范例的集合。

Qt Quick 范例 - 本地存储

一批 QML 本地存储范例。

Qt Quick 范例 - MouseArea

This is an example of the MouseArea type in QML.

Qt Quick 范例 - Positioner

这是 QML Positioner 范例的集合。

Qt Quick Examples - Right to Left

This is a collection of QML Right to Left examples.

Qt Quick Examples - Shader Effects

A Qt Quick example demonstrating the use of shader effects.

Qt Quick 范例 - 文本

这是文本相关 QML 范例的集合。

Qt Quick Examples - Threading

This is a collection of QML multithreading examples.

Qt Quick Examples - Touch Interaction

A collection of QML Touch Interaction examples.

Qt Quick 范例 - 视图

这是 QML 模型/视图范例的集合。

Qt Quick 范例 - 窗口和屏幕

This example demonstrates the Window and Screen types in QML

Qt Quick Examples - externaldraganddrop

This is an example of drag-and-drop among QML applications.

Qt Quick Layouts - 基本范例

演示如何使用布局类型来排列 UI

Qt Quick Particles 范例 - 影响器

这是使用 QML 粒子系统 Affector 范例的集合。

Qt Quick Particles Examples - CustomParticle

This is a collection of examples using CustomParticle in the QML particle system.

Qt Quick Particles 范例 - 发射器

This is a collection of examples using Emitters in the QML particle system.

Qt Quick Particles 范例 - 图像粒子

这是使用 QML 粒子系统 Affector 范例的集合。

Qt Quick Particles 范例 - 系统

这是使用 QML 粒子系统 Affector 范例的集合。

Qt Quick Widgets 范例

Demonstrates how to mix QML with a Qt Widgets application using the QQuickWidget class.

场景图形 - 自定义几何图形

Shows how to implement a custom geometry in the Qt Quick Scene Graph.

场景图形 - 图形

Demonstrates how one can combine custom materials and geometries under a single QQuickItem.

场景图形 - QML 下的 OpenGL

展示如何在 Qt Quick 场景下渲染 OpenGL。

Scene Graph - Painted Item

Shows how to implement QPainter-based custom scenegraph items.

场景图形 - 渲染 FBO (帧缓冲对象)

展示如何采用 Qt Quick 使用 FramebufferObjects。

Scene Graph - Rendering FBOs in a thread

Shows how to use FramebufferObjects in a thread together with Qt Quick.

场景图形 - 简单材质

展示如何定义场景图形材质以填充形状。

场景图形 - 2 纹理提供程序

展示如何在自定义场景图节点中,组合来自 2 纹理提供程序的 2 纹理。

TabWidget 范例

The TabWidget example shows how to create a tabwidget using property aliases and QML Object default properties

Threaded ListModel Example

The Threaded ListModel example shows how to use a ListModel from multiple threads using WorkerScript.

UI Components: Dial Control Example

The Dial Control Example shows how to create a speedometer-type dial.

UI Components: Flipable Example

The Flipable Example shows an item that flips whenever clicked, rotating around the y-axis.

UI Components: Scroll Bar Example

The Scroll Bar Example shows how to use scroll bars on a flickable element.

Qt Quick Controls

Qt Quick Controls - Calendar Example

Demonstrates the use of Calendar control

Qt Quick Controls - File System Browser Example

An example for the TreeView control.

Qt Quick Controls - 画廊

A collection of components for a classic desktop-style UI.

Qt Quick Controls - Styles Example

Demonstrates custom styles

Qt Quick Controls - Table View Example

An example for the TableView control.

Qt Quick Controls - Text Editor Example

A QML app using Qt Quick Controls and a C++ class to provide a fully-functional rich-text editor application.

Qt Quick Controls - Touch Gallery

Demonstrates UI controls for a touch interface

Qt Quick Controls - UI Forms

Demonstrates how to separate the application logic from the UI.

Qt Quick Controls 2

Qt Quick Controls 2 - Chat Tutorial

Tutorial about writing a basic chat client using Qt Quick Controls 2.

Qt Quick Controls 2 - Contact List

A QML app using Qt Quick Controls 2 and a C++ class that implements a simple contact list.

Qt Quick Controls 2 - Flat Style

A QML app using Qt Quick Controls 2 and a QML plugin with customized controls.

Qt Quick Controls 2 - Gallery

控件画廊。

Qt Quick Controls 2 - Side Panel

A non-closable persistent side panel with Drawer.

Qt Quick Controls 2 - Swipe to Remove

Demonstrates removing list items by swipe.

Qt Quick Controls 2 - Text Editor

A QML app using Qt Quick Controls 2 and a C++ class to provide a fully-functional rich-text editor application.

Qt Quick Controls 2 - Wearable Demo

Demonstrates an application launcher designed for wearable devices.

Qt Quick Dialogs

Qt Quick System Dialog Examples

This example demonstrates the system dialog types in QML

Qt Quick Extras

Qt Quick Extras - Dashboard

A car dashboard created using several CircularGauge controls.

Qt Quick Extras - Flat

An interactive showcase of the flat style.

Qt Quick Extras - Gallery

An interactive showcase of the various controls.

Qt SCXML

Qt SCXML 计算器范例

A widget-based application that implements the Calculator example presented in the SCXML Specification.

Qt SCXML 计算器 QML 范例

A Qt Quick application that implements the Calculator example presented in the SCXML Specification.

Qt SCXML FTP 客户端范例

使用状态机实现简单 FTP 客户端。

Qt SCXML 援引范例 (动态)

援引动态加载嵌套状态机。

Qt SCXML 援引范例 (静态)

援引编译嵌套状态机。

Qt SCXML 媒体播放器范例 (动态)

A widget-based application that sends data to and receives it from a dynamically loaded ECMAScript data model.

Qt SCXML 媒体播放器范例 (静态)

A widget-based application that sends data to and receives it from a compiled ECMAScript data model.

Qt SCXML 媒体播放器 QML 范例 (C++ 数据模型)

发送数据到 C++ 数据模型和接收数据从 C++ 数据模型。

Qt SCXML 媒体播放器 QML 范例 (动态)

A Qt Quick application that sends data to and receives it from a dynamically loaded ECMAScript data model.

Qt SCXML 媒体播放器 QML 范例 (静态)

A Qt Quick application that sends data to and receives it from a compiled ECMAScript data model.

Qt SCXML 弹球范例

Encapsulates the internal logic of an application in an SCXML file.

Qt SCXML 数独范例

Presents the use of SCXML in a sudoku game.

Qt SCXML 交通灯范例 (动态)

A widget-based application that uses a dynamically loaded state machine to implement a traffic light.

Qt SCXML 交通灯范例 (静态)

A widget-based application that uses a compiled state machine to implement a traffic light.

Qt SCXML 交通灯 QML 范例 (动态)

A Qt Quick application that uses a dynamically loaded state machine to implement a traffic light.

Qt SCXML 交通灯 QML 范例 (简单)

A Qt Quick application that uses a compiled state machine to implement a simplified traffic light.

Qt SCXML 交通灯 QML 范例 (静态)

A Qt Quick application that uses a compiled state machine to implement a traffic light.

Qt SQL

Books

Shows how to use Qt SQL classes with a model/view framework.

Cached Table Example

The Cached Table example shows how a table view can be used to access a database, caching any changes to the data until the user explicitly submits them using a push button.

Drill Down Example

The Drill Down example shows how to read data from a database as well as submit changes, using the QSqlRelationalTableModel and QDataWidgetMapper classes.

Master Detail Example

The Master Detail Example shows how to present data from different data sources in the same application. The album titles, and the corresponding artists and release dates, are kept in a database, while each album's tracks are stored in an XML file.

Query Model Example

The Query Model example shows how to make customized versions of data obtained from a SQL query, using a model that encapsulates the query and table views to display the results.

Relational Table Model Example

The Relational Table Model example shows how to use table views with a relational model to visualize the relations between items in a database.

SQL Browser

The SQL Browser example shows how a data browser can be used to visualize the results of SQL statements on a live database.

SQL Widget Mapper Example

The SQL Widget Mapper example shows how to use a map information from a database to widgets on a form.

表格模型范例

The Table Model example shows how to use a specialized SQL table model with table views to edit information in a database.

Qt SVG

Qt Script

Qt Sensors

Qt Sensors - Accel Bubble

The AccelBubble example demonstrates the Accelerometer QML type.

Qt Sensors - C++ Sensor Gestures Example

The sensor gesture example demonstrates the steps for creating a C++ application that uses sensor gestures and the included shake sensor.

Qt Sensors - Explorer QML Example

Demonstrates how to read the meta-data of available sensors.

Qt Sensors - 格鲁传感器范例

The Qt Sensors - Grue sensor example demonstrates all the steps from creating a new sensor to using it.

Qt Sensors - Maze QML Example

The Maze example demonstrates the TiltSensor QML type.

Qt Sensors - QML example

The QtSensors - QML example demonstrates the QML sensors types in the QtSensors 5 import.

Qt Sensors - SensorGesture QML Type example

Demonstrates the use of SensorGesture QML type.

Qt Sensors - ShakeIt QML Example

The sensor gesture example demonstrates the steps for creating a QML application that uses sensor gestures and the included shake sensor.

Qt Serial Bus

CAN Bus 范例

范例发送/接收 CAN Bus 帧。

Modbus 主控范例

范例实现 Modbus 主控应用程序。

Modbus 从属范例

范例实现 Modbus 从属应用程序。

Qt Serial Port

阻塞主控范例

展示如何在工作者线程中使用 QSerialPort 的同步 API。

阻塞从属范例

展示如何在非 GUI 线程中使用 QSerialPort 的同步 API。

命令行枚举器范例

展示如何获取有关系统中串行设备的信息。

命令行读取器异步范例

展示如何通过串行端口异步接收数据。

命令行读取器同步范例

展示如何通过串行端口同步接收数据。

命令行写入器异步范例

展示如何通过串行端口异步发送数据。

命令行写入器同步范例

展示如何通过串行端口同步发送数据。

枚举器范例

展示如何显示有关系统中串行设备的信息。

终端范例

展示如何使用各种 QSerialPort 特征。

Qt Speech

Hello 说话范例

The Hello Speak example reads out a small piece of text

Qt Test

第 1 章:编写单元测试

如何编写单元测试。

第 2 章:数据驱动测试

如何创建数据驱动测试。

第 3 章:模拟 GUI 事件

如何模拟 GUI 事件。

第 4 章:重演 GUI 事件

如何重演 GUI 事件。

第 5 章:编写基准

如何编写基准。

Qt UI Tools

Multiple Inheritance Example

Using a form created with Qt Designer in an application.

文本查找器落例

Dynamically loading .ui files using QUiLoader.

Qt Virtual Keyboard

Qt Quick Virtual Keyboard - Basic Example

This is a basic QML example that uses the virtual keyboard.

Qt Wayland Compositor

Qt Wayland Compositor Examples - IVI Compositor

IVI Compositor is an example that demonstrates how to use the IviApplication extension.

Qt Wayland Compositor Examples - Minimal QML

Minimal QML is a simple example that demonstrates how to write a Wayland compositor in QML.

Qt Wayland Compositor Examples - Multi Output

Multi Output is an example that demonstrates a compositor with multiple outputs.

Qt Wayland Compositor Examples - Multi Screen

Multi Screen is a desktop-style Wayland compositor for multiple screens.

Qt Wayland Compositor Examples - Pure QML

Pure QML is an example that demonstrates how to write a Wayland compositor in pure QML.

Qt Wayland Compositor Examples - QWindow Compositor

QWindow Compositor is an example that demonstrates how to write a Wayland compositor in C++.

Qt Wayland Compositor Examples - Spanning Screens

Spanning Screens is an example that demonstrates how to let Wayland clients span multiple screens.

Qt WebChannel

Qt WebChannel ChatClient HTML 范例

通过 WebSocket 与 QWebChannel 服务器通信的 HTML/JavaScript 客户端。

Qt WebChannel ChatClient QML 范例

通过 WebSocket 与 QWebChannel 服务器通信的 QML 客户端。

Qt WebChannel ChatServer 范例

以 QWebChannel C++ API 实现的简单聊天服务器。

Qt WebChannel 独立范例

在服务器和运行于浏览器的远程客户端之间的简单聊天。

Qt WebEngine

WebEngine 内容操纵范例

演示如何加载和操纵 Web 内容。

WebEngine Cookie 浏览器范例

A cookie browser based on Qt WebEngine Widgets

WebEngine Demo Browser Example

A demo browser based on Qt WebEngine Widgets

WebEngine Markdown 编辑器范例

演示如何在混合桌面应用程序中集成 Web 引擎。

WebEngine Qt Quick 自定义对话框范例

Customizes UI elements of Qt WebEngine's dialogs

WebEngine Qt Quick 最小范例

Displays a web page using the Qt Quick integration of Qt WebEngine

WebEngine Quick 纳米浏览器

以 WebEngineView QML 类型实现的 Web 浏览器。

WebEngine 食谱浏览器

基于 WebEngineView QML 类型和 Qt Quick Controls 2 的小型混合应用程序。

WebEngine Widgets Html2Pdf 范例

Converts web pages to PDF documents using Qt WebEngine

WebEngine Widgets 地图范例

Demonstrates how to handle geolocation requests

WebEngine Widgets 最小范例

Displays a web page using Qt WebEngine Widgets

WebEngine Widgets 简单浏览器范例

A simple browser based on Qt WebEngine Widgets

WebEngine Widgets 拼写检查器范例

把拼写检查器集成到简单 HTML 表单。

WebEngine Widgets 视频播放器范例

Displays full screen video using QWebEngineView

Qt WebSockets

回显客户端范例

描述如何以 WebSocket API,创建简单回显客户端。

回显服务器范例

展示如何创建发送回接收消息的,简单服务器应用程序。

QML WebSocket 客户端范例

阐述如何编程 QML WebSocket 客户端的范例。

QML WebSocket 服务器范例

展示如何使用 QML WebSocketServer 的。

SSL 回显客户端范例

展示如何使用 QWebSocket 类通过安全连接 (wss) 实现回显客户端。

SSL 回显服务器范例

展示如何使用 QWebSocketServer 类通过安全套接字 (wss) 实现简单回显服务器。

简单聊天范例

展示如何使用 QWebSocket 和 QWebSocketServer 类通过 WebSocket 协议创建简约聊天应用程序。

Qt WebView

Qt WebView 范例 - Minibrowser

Minibrowser 范例演示了如何把 Qt WebView 模块与 Qt Quick 一起使用。

Qt Widgets

40000 个芯片

可视化具有 40000 个芯片项的巨大图形视图场景

地址簿范例

The address book example shows how to use proxy models to display different views onto data from a single model.

仿射变换

Demonstrates how affine transformations in QPainter works.

指针式时钟范例

指针式时钟范例展示如何绘制自定义 Widget 的内容。

锚点布局范例

Demonstrates anchor layout in a graphics view scene

Animated Tiles Example

The Animated Tiles example animates items in a graphics scene.

Application Chooser Example

The Application Chooser example shows how to use the Qt state machine and the animation framework to select between applications.

应用程序范例

The Application example shows how to implement a standard GUI application with menus, toolbars, and a status bar. The example itself is a simple text editor program built around QPlainTextEdit.

基本绘制范例

The Basic Drawing example shows how to display basic graphics primitives in a variety of styles using the QPainter class.

基本图形布局范例

演示如何创建基本图形布局

基本布局范例

Shows how to use the standard layout managers.

基本排序/过滤模型范例

The Basic Sort/Filter Model example illustrates how to use QSortFilterProxyModel to perform basic sorting and filtering.

模糊拾取器效果示例

Demonstrates how to apply graphical effects on items in the view

边框布局范例

Shows how to arrange child widgets along a border.

Boxes

Combines advanced OpenGL rendering with the Graphics View framework

计算器范例

范例展示如何使用信号/槽来实现计算器 Widget 功能,及如何使用 QGridLayout 将子级小部件放在栅格中。

日历范例

The Calendar example shows how to create rich text content and display it using a rich text editor.

日历 Widget 范例

日历 Widget 范例展示使用 QCalendarWidget。

字符映射范例

字符映射范例展示如何创建既可以显示自身内容,又可以响应用户输入的自定义 Widget。

图表范例

The Chart example shows how to create a custom view for the model/view framework.

类向导范例

The License Wizard example shows how to implement linear wizards using QWizard.

代码编辑器范例

代码编辑器范例展示如何创建拥有行号和突显当前行的简单编辑器。

碰撞小鼠范例

Demonstrates how to animate items on a graphics view

色彩编辑器工厂范例

This example shows how to create an editor that can be used by a QItemDelegate.

组合框 Widget 映射器范例

The Combo Widget Mapper example shows how to use a custom delegate to map information from a model to specific widgets on a form.

补全器范例

The Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model.

合成模式

Demonstrates how Composition Modes work in QPainter.

同心圆范例

Demonstrates the improved quality that antialiasing and floating point precision gives.

Config Dialog Example

The Config Dialog examples shows how a configuration dialog can be created by using an icon view with a stacked widget.

自定义补全器范例

The Custom Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model. The completer pops up suggestions for possible words based on the first three characters input by the user and the user's choice of word is inserted into the TextEdit using QTextCursor.

自定义排序/过滤模型范例

The Custom Sort/Filter Model example illustrates how to subclass QSortFilterProxyModel to perform advanced sorting and filtering.

简图场景示例

演示如何使用图形视图框架

数字时钟范例

数字时钟范例展示如何使用 QLCDNumber 显示具有类似 LCD 数字的数。

目录视图范例

This example demonstrates the usage of a tree view.

停放 Widget 范例

The Dock Widgets example shows how to add dock windows to an application. It also shows how to use Qt's rich text engine.

拖放拼图范例

The Drag and Drop Puzzle example demonstrates a way of using the drag and drop system with item view widgets.

拖放 Robot 范例

Demonstrates how to drag and drop items in a graphics view

可拖曳图标范例

The Draggable Icons example shows how to drag and drop image data between widgets in the same application, and between different applications.

可拖曳文本范例

The Draggable Text example shows how to drag and drop textual data between widgets in the same application, and between different applications.

掉落站点范例

The example shows how to distinguish the various MIME formats available in a drag and drop operation.

动态布局范例

Shows how to re-orient widgets in running applications.

缓和曲线范例

The Easing Curves example shows how to use easing curves to control the speed of an animation.

回显插件范例

此范例展示如何创建 Qt 插件。

可编辑树模型范例

This example shows how to implement a simple item-based tree model that can be used with other classes the model/view framework.

弹性节点范例

Demonstrates how to interact with graphical items in a scene

省略标签范例

This example creates a widget similar to QLabel, that elides the last visible line, if the text is too long to fit the widget's geometry.

嵌入式对话框

Demonstrates how to embed dialogs into a graphics view

事件过渡范例

The Event Transitions example shows how to use event transitions, a feature of The State Machine Framework.

扩展范例

The Extension example shows how to add an extension to a QDialog using the QAbstractButton::toggled() signal and the QWidget::setVisible() slot.

Factorial States Example

The Factorial States example shows how to use The State Machine Framework to calculate the factorial of an integer.

褪色消息效果范例

Demonstrates how to apply effects on items in the view

抓取更多范例

The Fetch More example shows how two add items to an item view model on demand.

查找文件范例

The Find Files example shows how to use QProgressDialog to provide feedback on the progress of a slow operation. The example also shows how to use QFileDialog to facilitate browsing, how to use QTextStream's streaming operators to read a file, and how to use QTableWidget to provide standard table display facilities for applications. In addition, files can be opened using the QDesktopServices class.

流式布局范例

Shows how to arrange widgets for different window sizes.

字体采样器范例

The Font Sampler example shows how to preview and print multi-page documents.

冰箱磁贴范例

The Fridge Magnets example illustrates how to move around several types of MIME-encoded data with drag and drop.

冻结列范例

This example demonstrates how to freeze a column within a QTableView.

渐变

Shows how gradients can be used with QPainter.

图形视图流布局范例

Demonstrates flow layout on a graphics view scene.

组框范例

组框范例展示如何在 Qt 中使用不同种类的组框。

I18N 范例

The Internationalization (I18N) example demonstrates Qt's support for translated text. Developers can write the initial application text in one language, and translations can be provided later without any modifications to the code. It also demonstrates how to detect the system language settings and show the UI in the appropriate language.

图标范例

图标范例展示 QIcon 如何生成反射图标状态、模式及大小的像素图。

图像合成范例

Shows how composition modes work in QPainter.

图像手势范例

Demonstrates the use of simple gestures in a widget

图像查看器范例

范例展示如何组合 QLabel 和 QScrollArea 以显示图像。

Interview

此范例演示模型/视图框架的用法。

项视图拼图范例

The Puzzle example shows how to enable drag and drop with a custom model to allow items to be transferred between a view and another widget.

许可向导范例

The License Wizard example shows how to implement complex wizards in Qt.

Lighting Effect Example

Demonstrates how to apply effects on items in the view

行编辑范例

The Line Edits example demonstrates the many ways that QLineEdit can be used, and shows the effects of various properties and validators on the input and output supplied by the user.

MDI 范例

The MDI example shows how to implement a Multiple Document Interface using Qt's QMdiArea class.

主窗口

The Main Window example shows Qt's extensive support for tool bars, dock windows, menus, and other standard application features.

菜单范例

The Menus example demonstrates how menus can be used in a main window application.

鼠标按钮测试器

The 'Mouse Button Tester' example demonstrates how to reimplement mouse events within a custom class. You can also use this program to verify that Qt is actually receiving mouse events from your mouse.

Move Blocks Example

The Move Blocks example shows how to animate items in a QGraphicsScene using a QStateMachine with a custom transition.

电影范例

The Movie example demonstrates how to use QMovie and QLabel to display animations.

订购表单范例

The Order Form example shows how to generate rich text documents by combining a simple template with data input by the user in a dialog.

Pad Navigator Example

Demonstrates how to create animated user interface

描绘器路径范例

The Painter Paths example shows how painter paths can be used to beuild complex shapes for rendering.

第 1 部分 - 设计用户界面

第 2 部分 - 添加地址

第 3 部分 - 在条目之间导航

第 4 部分 - 编辑和移除地址

第 5 部分 - 添加查找功能

第 6 部分 - 加载和保存

第 7 部分 - 额外特征

路径笔画

The Path Stroking example shows various types of pens that can be used with QPainter.

Ping Pong States Example

The Ping Pong States example shows how to use parallel states together with custom events and transitions in The State Machine Framework.

像素器范例

The Pixelator example shows how delegates can be used to customize the way that items are rendered in standard item views.

插件和描绘基本工具范例

插件为描绘功能提供基本工具。

插件和描绘范例

演示如何使用插件扩展 Qt 应用程序。

插件和描绘额外过滤器范例

提供额外过滤器的插件。

QRegularExpression 范例

The QRegularExpression example shows how regular expressions in Qt are applied to text by providing an environment in which new regular expressions can be created and tested on custom text strings.

Regular Expressions Example

The Regular Expressions (RegExp) example shows how regular expressions in Qt are applied to text by providing an environment in which new regular expressions can be created and tested on custom text strings.

Rogue Example

The Rogue example shows how to use the Qt state machine for event handling.

SDI 范例

The SDI example shows how to create a Single Document Interface. It uses a number of top-level windows to display the contents of different text files.

屏幕截图范例

The Screenshot example shows how to take a screenshot of the desktop.

涂鸦范例

The Scribble example shows how to reimplement some of QWidget's event handlers to receive the events generated for the application's widgets.

设置编辑器范例

设置编辑器范例展示如何在应用程序中使用 Qt 的标准设置支持,通过提供的编辑器使用户能够查看已安装应用程序设置,并修改那些可以编辑的设置。

异形时钟范例

The Shaped Clock example shows how to apply a widget mask to a top-level widget to produce a shaped window.

简单锚点布局范例

演示图形视图场景中的锚点布局

简单 DOM 模型范例

The Simple DOM Model example shows how an existing class can be adapted for use with the model/view framework.

简单树模型范例

The Simple Tree Model example shows how to use a hierarchical model with Qt's standard view classes.

简单 Widget 映射器范例

The Simple Widget Mapper example shows how to use a widget mapper to display data from a model in a collection of widgets.

滑块范例

The Sliders example shows how to use the different types of sliders available in Qt: QSlider, QScrollBar and QDial.

自旋框委托范例

The Spin Box Delegate example shows how to create an editor for a custom delegate in the model/view framework by reusing a standard Qt editor widget.

自旋框范例

The Spin Boxes example shows how to use the many different types of spin boxes available in Qt, from a simple QSpinBox widget to more complex editors like the QDateTimeEdit widget.

电子表格

The Spreadsheet example shows how to create a simple spreadsheet application.

标准对话框范例

The Standard Dialogs example shows the standard dialogs that are provided by Qt.

星号委托范例

The Star Delegate example shows how to create a delegate that can paint itself and that supports editing.

状态范例

The States example shows how to use the Qt state machine to play animations.

Stickman Example

The Stickman example shows how to animate transitions in a state machine to implement key frame animations.

样式插件范例

This example shows how to create a plugin that extends Qt with a new GUI look and feel.

样式表范例

样式表范例展示如何使用样式表。

样式范例

The Styles example illustrates how to create custom widget drawing styles using Qt, and demonstrates Qt's predefined styles.

Sub-Attaq

This example shows Qt's ability to combine the animation framework and the state machine framework to create a game.

句法高亮范例

The Syntax Highlighter example shows how to perform simple syntax highlighting.

系统托盘图标范例

The System Tray Icon example shows how to add an icon with a menu and popup messages to a desktop environment's system tray.

选项卡对话框范例

The Tab Dialog example shows how to construct a tab dialog using the QTabWidget class.

数位板范例

此范例展示如何在 Qt 应用程序中使用 Wacom 数位板。

俄罗斯方块范例

俄罗斯方块范例是经典俄罗斯方块游戏的 Qt 版本。

文本编解码器范例

如何使用文本编解码器导入/导出文本。

文本编辑

The Text Edit example shows Qt's rich text editing facilities in action.

工具提示范例

工具提示范例展示如何为应用程序 Widget 提供静态和动态工具提示。

Traffic Light Example

The Traffic Light example shows how to use The State Machine Framework to implement the control flow of a traffic light.

变换范例

The Transformations example shows how transformations influence the way that QPainter renders graphics primitives.

树模型补全器范例

The Tree Model Completer example shows how to provide completion facilities for a hierarchical model, using a period as the separator to access Child, GrandChild and GrandGrandChild level objects.

平凡向导范例

The Trivial Wizard example illustrates how to create a linear three-page registration wizard using three instances of QWizardPage and one instance of QWizard.

双向按钮范例

The Two-way button example shows how to use The State Machine Framework to implement a simple state machine that toggles the current state when a button is clicked.

撤消框架

This example shows Qt's undo framework in action.

撤消框架范例

This example shows how to implement undo/redo functionality with the Qt undo framework.

验证器范例

The Validators example shows the signal emission behavior of input validators.

向量变形

Demonstrates how to manipulate the elements of a QPainterPath.

天气锚点布局范例

演示图形视图场景中的锚点布局

Widget 教程 - 子级 Widget

Widget 教程 - 创建窗口

Widget 教程 - 嵌套布局

Widget 教程 - 使用布局

摆动范例

The Wiggly example shows how to animate a widget using QBasicTimer and timerEvent(). In addition, the example demonstrates how to use QFontMetrics to determine the size of text on screen.

窗口标志范例

窗口标志范例展示如何使用可用于 Qt 的窗口标志。

Qt Windows Extras

图标提取器

演示访问包含在 Windows 二进制文件中的图标。

音乐播放器

演示管理 Windows DWM (桌面窗口管理器) 特征、跳转列表、任务栏按钮叠加和缩略图工具栏。

Quick 播放器

演示在 Qt Quick 中使用 QtWinExtras。

Qt XML

DOM 书签范例

提供用于 XML 书签交换语言文件的读取器

QXmlStream 书签范例

演示如何读写 XBEL 文件

SAX Bookmarks Example

Demonstrates how to read XBEL files

XML Stream Lint 范例

读取输入文件并写入标准输出文件的命令行工具。

Qt XML Patterns

C++ 源代码分析器范例

Using XQuery and the xmlpatterns command line utility to query C++ source code.

文件系统范例

Using Qt XML Patterns for querying non-XML data that is modeled to look like XML.

配方范例

Using Qt XML Patterns to query XML data loaded from a file.

XML 模式验证范例

Using Qt XML Patterns to validate XML with a W3C XML Schema.