所有 Qt 范例

Calqlatr

A Qt Quick app designed for portrait devices that uses custom components, animated with AnimationController, and JavaScript for the application logic.

咖啡机

具有基于状态的自定义用户界面的 Qt Quick 应用程序。

Dice

A dice throwing application that demonstrates using Qt Quick 3D Physics and Qt Quick 3D.

文档查看器

用于显示和打印 JSON、文本及 PDF 文件的 Widget 应用程序。

FX & Material Showroom

Demonstrates material and effects capabilities of Qt Quick 3D. This example demonstrates how you can use particle effects and materials in Qt Quick 3D.

采用 Qt Quick 快速入门编程

基于警报应用程序的 Qt Quick 教程。

在 APP 中购买演示

演示购买 APP 中产品的完整移动应用程序。

媒体播放器范例

使用 Qt Quick 播放音频和视频。

照片表面

A QML app for touch devices that uses a Repeater with a FolderListModel to access content in a folder, and a PinchHandler to handle pinch gestures on the fetched content.

Qt Quick 演示 - 时钟

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

Qt Quick Demo - RESTful API client

Example of how to create a RESTful API QML client.

Qt Quick 演示 - RSS 新闻

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

Qt Quick 演示 - StocQt

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

Qt Widgets - Text Viewer Plugin Example

A widget example with menus, toolbars and a status bar.

Robot Arm Example

Demonstrates how to add a C++ backend to a 3D project from Qt Design Studio. This example demonstrates adding a C++ backend to a 3D project created in Qt Design Studio. The example itself consists of an interactive industrial robot arm in a Qt Quick 3D scene. The 2D UI to control the robot arm is implement using Qt Quick Controls.

Thermostat

A user interface for a home thermostat, implemented in Qt Quick. It demonstrates how to create responsive applications that scale from large desktop displays to mobile and small embedded displays.

To Do List Example

A QML implementation of to do list application that demonstrates how to create application thats looks native on any platform.

Active Qt

COM App 范例 (ActiveQt)

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

Outlook 范例 (ActiveQt)

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)

Simple example demonstrates the use of QAxBindable and QAxFactory

包裹器范例 (ActiveQt)

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:基本形状 C++ 范例

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

Qt 3D:多视口 QML 范例

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

Qt 3D:PBR 材质 QML 范例

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

Qt 3D:简单 C++ 范例

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

Qt 3D:简单自定义材质 QML 范例

演示在 Qt 3D 中创建自定义材质

Qt 3D:简单 QML 范例

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

Qt 3D:线框 QML 范例

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

Qt Assistant 手册

远程控制范例

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

简单文本查看器范例

使用 Qt Assistant 作为应用程序的自定义帮助查看器

Qt Bluetooth

蓝牙聊天

Shows communication through Bluetooth using RFCOMM protocol

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

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

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

Qt Charts

Audio Samples vs Sound Level

This example shows the drawing of microphone samples vs audio level

Charts with QML Gallery

Demonstrates how to use the different chart types by using qml

Charts with Widgets Gallery

An application that demonstrates the Qt Charts Widgets API

OpenGL 加速系列范例

Example shows how to enable OpenGL acceleration for QLineSeries and QScatterSeries

QML 示波器

Example shows how to implement application with strict performance requirements using the Qt Charts QML API

QML 天气

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

缩放线范例

Example shows how to create your own custom zooming effect

Qt CoAP

Quick CoAP Multicast Discovery

使用 CoAP 客户端采用 Qt Quick 用户界面进行多点播送资源探索

Quick Secure CoAP Client

Securing the CoAP client and using it with a Qt Quick user interface

Simple CoAP Client

Creating an application that communicates with a CoAP server

Qt Concurrent

Image Scaling

演示如何异步下载和比例缩放图像

Prime Counter

Demonstrates how to monitor the progress of concurrent operations

Word Count

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

Qt Core

Bindable Properties

Demonstrates how the usage of bindable properties can simplify your C++ code

连续缓存范例

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

IPC: Shared Memory

Demonstrates how to share image data between different processes using the Shared Memory IPC mechanism

Local Fortune Client

Demonstrates using QLocalSocket for a simple local service client

Local Fortune Server

Demonstrates using QLocalServer and QLocalSocket for serving a simple local service

MIME Type Browser

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

Mandelbrot

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

Parsing and displaying CBOR data

A demonstration of how to parse files in CBOR format

使用信号量的生产者和消费者

Producer and Consumer using Semaphores example shows how to use QSemaphore to control access to a circular buffer shared by a producer thread and a consumer thread

使用等待条件的生产者和消费者

Producer and Consumer using Wait Conditions example shows how to use QWaitCondition and QMutex to control access to a circular buffer shared by a producer thread and a consumer thread

QXmlStream 书签范例

Demonstrates how to read and write XBEL files

Qt Android 通知程序

演示在 Android 应用程序中从 Qt 调用 Java 代码

Queued Custom Type

Queued Custom Type example shows how to send custom types between threads with queued signals and slots

Saving and Loading a Game

How to save and load a game using Qt's JSON or CBOR classes

Serialization Converter

How to convert between different serialization formats

Qt D-Bus

D-Bus Chat

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

D-Bus Complex Ping Pong

Demonstrates usage of the Qt D-Bus typesystem

D-Bus Ping Pong

Demonstrates a simple message system using D-Bus

D-Bus Remote Controlled Car

Shows how to use Qt D-Bus to control a car from another application

Qt Data Visualization

Axis Handling

Implementing axis dragging with a custom input handler in QML, and creating a custom axis formatter

Graph Gallery

Gallery of Bar, Scatter, and Surface graphs

Simple Bar Graph

Using Bars3D in a QML application

Simple Scatter Graph

Using Scatter3D in a QML application

Surface Graph Gallery

Gallery with three different ways to use a Surface3D graph

Volumetric Rendering

Rendering volumetric objects

Qt Designer 手册

计算器构建器

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

计算器表单

Using a form created with Qt Designer in an application

Calculator Form/Multiple Inheritance

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

Creating a custom widget plugin for Qt Designer

任务菜单扩展

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

Qt GRPC

Chat

Using the Qt GRPC client API in the user applications

Magic 8 Ball

Creating a HTTP2 connection between a Qt GRPC client and a C++ gRPC server

Qt GUI

Hello Vulkan Cubes Example

Shows the basics of using QVulkanWindow

Hello Vulkan Triangle Example

Shows the basics of rendering with QVulkanWindow and the Vulkan API

Hello Vulkan 小部件范例

Shows the usage of QVulkanWindow in QWidget applications

RHI Window Example

This example shows how to create a minimal QWindow-based application using QRhi

光栅窗口范例

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

Qt Graphs

Axis Handling

Implementing axis dragging with a custom input handler in QML, and creating a custom axis formatter

Graph Gallery

Gallery of Bar, Scatter, and Surface graphs

Simple Bar Graph

Using Bars3D in a QML application

Simple Scatter Graph

Using Scatter3D in a QML application

Surface Graph Gallery

Gallery with three different ways to use a Surface3D graph

Volumetric Rendering

Rendering volumetric objects

Qt HTTP Server

RESTful API Server

Example of how to create a RESTful API server using the QHttpServer

Simple HTTP Server

Simple example of how to set up an HTTP server

Qt Help

上下文大小写帮助范例

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

Qt Linguist 手册

Arrow Pad 范例

理解 Qt Linguist 上下文概念和使用 2 种或多种语言

Hello tr() 范例

将小 Hello World 程序翻译成拉丁语

I18N 范例

演示 Qt 对翻译文本的支持

Troll Print 范例

更新用于稍后发行的翻译

Qt Location

GeoJson Viewer (C++/QML)

GeoJson viewer example demonstrates how to manipulate MapItems, handle user input and I/O to and from a GeoJson file

地图查看器 (QML)

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

MapItemView Transitions (QML)

How to use transitions together with MapItemView

Minimal Map (QML)

Minimum code to display a map using Qt Quick

Places (QML)

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

Places List (QML)

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

地点地图 (QML)

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

Plane Spotter (QML)

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

Qt MQTT

MQTT Subscriptions

Creating a application that communicates with an MQTT broker

Qt Quick Publication

Use Qt Quick Controls to create an application that can publish on MQTT topics

Qt Quick Subscription

Use Qt Quick Controls to create an application that can subscribe to MQTT topics

Simple MQTT Client

Creating a minimalistic telemetry application

WebSockets MQTT 订阅

Combining an MQTT client with a web socket connection

Qt Multimedia

音频设备范例

Testing the available audio devices and their configuration

音频输出范例

Enabling audio playback using the QAudioSink class

音频录制器范例

Discovering the available devices and supported codecs

Audio Source Example

Recording audio using the QAudioSource class

摄像头范例

Shows how to capture a still image or record video

媒体播放器范例

播放音频和视频

QML Camera Application

This Qt Quick based application shows how to use the API to capture a still image or video

QML 媒体播放器范例

Playing audio and video using Qt Quick

QML 视频范例

Transforming video and camera viewfinder content

QML 视频录制器

Recording audio and video using Qt Quick

Screen Capture Example

Capturing a screen or window

Spectrum Example

Analyzing a raw audio stream using the FFTReal library

视频图形项范例

Streaming video on a graphics scene

视频小部件范例

实现视频播放器 Widget

Qt NFC

Annotated URL

Example shows reading from formatted NFC Data Exchange Format (NDEF) messages

NDEF 编辑器范例

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

Qt Network

A minimal RSS listing application

A demonstration of how to fetch and display a network resource

阻塞 Fortune 客户端

演示如何为网络服务创建客户端

广播接收器范例

Demonstrates how to receive information broadcasted over a local network

广播发送器范例

Demonstrates how to broadcast information to multiple clients on a local network

DTLS 客户端

This example demonstrates how to implement client-side DTLS connections

DTLS 服务器

This examples demonstrates how to implement a simple DTLS server

Fortune 客户端

演示如何为网络服务创建客户端

Fortune 服务器

Demonstrates how to create a server for a network service

HTTP Client

演示简单 HTTP 客户端

多点播送接收器

演示如何接收发送给多点播送组的信息

多点播送发送器

演示如何把消息发送给多点播送组

Network Chat

演示有状态点对点聊天客户端

安全套接字客户端范例

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

线程化 Fortune 服务器

Threaded Fortune Server example shows how to create a server for a simple network service that uses threads to handle requests from different clients. It is intended to be run alongside the Fortune Client example

Torrent 范例

演示复杂 TCP/IP 操作

Qt Network Authorization

Reddit 范例

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

Qt OPC UA

Qt OPC UA 查看器范例

使用模型/视图方式在树视图中显示 OPC UA 服务器的所有节点

Qt OPC UA X509 支持范例

展示如何生成密钥和证书签名请求

Qt Quick 水泵范例

与 OPC UA 服务器交互为简单机器构建基于 QML 的 HMI (人机界面)

水泵范例

与 OPC UA 服务器交互为简单机器构建基于 QML 的 HMI (人机界面)

Qt OpenGL

2D 描绘范例

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

Cube OpenGL ES 2.0 example

Shows how to manually rotate a textured 3D cube with user input

Hello GL2 范例

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

Hello GLES3 范例

Demonstrates OpenGL ES 3.0 functions via QOpenGLExtraFunctions

OpenGL 窗口范例

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

OpenGL 窗口范例

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

QOpenGLWidget Stereoscopic Rendering Example

This example shows how to create a minimal QOpenGLWidget based application with stereoscopic rendering support

纹理范例

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

Qt PDF

PDF 多页查看器范例

A Qt Quick PDF viewer that allows scrolling through the pages

PDF 查看器 Widget 范例

A widget-based PDF viewer that allows scrolling through the pages

Qt Positioning

Log File Position Source (C++)

Logfile Position Source shows how to create and work with a custom position source. It can be useful for simulating GPS data, or when the data is received in some custom format

SatelliteInfo (C++/QML)

SatelliteInfo example shows the available satellites using Sky View, Table View, or RSSI View and the user's current position

Weather Info (C++/QML)

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 Protobuf

传感器

Sensors example shows how two applications can communicate by sending protobuf messages using UDP sockets

Qt QML

QML 范例 - 动态场景

此范例演示创建动态组件

Qt Quick I18N

为 Qt Quick 应用程序生成翻译文件 (TS 和 QM)

Qt Quick

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

如何采用 QQuickImageProvider 加载 QML 图像

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 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 D3D11 Example

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

QQuickRenderControl OpenGL Example

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

QQuickWidget - QQuickView Comparison Example

Demonstrates the benefits of QQuickWidget over a QQuickView embedded as a native window

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 Examples - Embedded in Widgets

Demonstrates embedding a QQuickWindow into a QWidget UI via QWidget::createWindowContainer()

Qt Quick 范例 - 图像元素

This is a collection of QML examples relating to image types

Qt Quick Examples - Item Variable Refresh Rate

A Qt Quick example shows how to setup variable refresh rate for specific parts of the UI

Qt Quick 范例 - 键交互

This is a collection of QML keyboard interaction examples

Qt Quick 范例 - 本地存储

A collection of QML local storage examples

Qt Quick 范例 - MouseArea

This is an example of the MouseArea type in QML

Qt Quick Examples - MultiEffect Item Switcher

Demonstrates MultiEffect usage

Qt Quick Examples - MultiEffect Test Bed

Demonstrates MultiEffect usage

Qt Quick Examples - Pointer Handlers

Shows how to use Qt Quick Input Handlers in interactive components

Qt Quick 范例 - 定位器

This is a collection of QML Positioner examples

Qt Quick Examples - Shader Effects

A Qt Quick example demonstrating the use of shader effects

Qt Quick 范例 - 形状

A Qt Quick example demonstrating the use of shape items

Qt Quick 范例 - 文本

This is a collection of QML examples relating to text

Qt Quick 范例 - 视图

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

Qt Quick 范例 - 窗口和屏幕

This example demonstrates the Window and Screen types in QML

Qt Quick Layouts - 基本范例

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

Qt Quick Layouts - Responsive Layout Example

Demonstrates how to use LayoutItemProxy to make a responsive UI

Qt Quick Particles 范例 - 影响器

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

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 TableView 范例 - 康威的人生游戏

Conway’s Game of Life example shows how the QML TableView type can be used to display a C++ model that the user can pan around

Qt Quick TableViews 范例 - 像素器

Pixelator example shows how a QML TableView and a delegate can be used for custom table models

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

场景图形 - 自定义材质

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

Scene Graph - Custom QSGRenderNode

Shows how to use QSGRenderNode to implement custom rendering in the Qt Quick scenegraph

场景图形 - 在 QML 下的 Direct3D 11

Shows how to render directly with Direct3D 11 under a Qt Quick scene

场景图形 - 图形

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

场景图形 - Metal 纹理导入

Shows how to use a texture created directly with Metal

场景图形 - 在 QML 下的 Metal

Shows how to render directly with Metal under a Qt Quick scene

场景图形 - QML 下的 OpenGL

Shows how to render OpenGL under a Qt Quick scene

Scene Graph - Painted Item

Shows how to implement QPainter-based custom scenegraph items

Scene Graph - RHI Texture Item

Shows how to implement a custom QQuickItem that displays a QRhi-rendered texture

Scene Graph - RHI Under QML

Shows how to render directly with QRhi under a Qt Quick scene

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

Shows how to combine two textures from two texture providers in a custom scene graph node

场景图形 - Vulkan 纹理导入

Shows how to use a texture created directly with Vulkan

Scene Graph - Vulkan Under QML

Shows how to render directly with Vulkan under a Qt Quick scene

UI 组件:表盘控件范例

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

UI 组件:可翻转范例

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

Qt Quick 3D

Hello Qt Quick 3D Example

Demonstrates simple instanced drawing

Qt Quick 3D - 抗锯齿范例

Demonstrates the antialiasing modes in Qt Quick 3D

Qt Quick 3D - Baked Lightmap Example

Demonstrates the use of baked lightmaps in a 3D scene

Qt Quick 3D - 自定义效果范例

Demonstrates writing custom post-processing effects

Qt Quick 3D - 自定义几何图形范例

Demonstrates providing custom vertex data from C++ and QML

Qt Quick 3D - Custom Instanced Rendering

Demonstrates instancing with custom materials and a C++ instance table

Qt Quick 3D - 自定义材质范例

Demonstrates writing shaded custom materials

Qt Quick 3D - Custom Morphing Animation

Demonstrates writing C++ custom geometry with a morph target

Qt Quick 3D - 自定义着色器范例

Demonstrates the use of custom vertex and fragment shaders

Qt Quick 3D - 动态模型创建范例

Demonstrates dynamic model creation

Qt Quick 3D - HelloCube 范例

Demonstrates how to render 2D and 3D objects together in Qt Quick 3D

Qt Quick 3D - Instanced Rendering Example

Demonstrates how to do instanced rendering in Qt Quick 3D

Qt Quick 3D - 介绍

Demonstrates how to render a scene in Qt Quick 3D

Qt Quick 3D - Level of Detail Helper Example

Demonstrates the use of level of detail helper

Qt Quick 3D - 灯光范例

Demonstrates the use of different light types

Qt Quick 3D - Morphing Example

Demonstrates how to control morphing animations in Qt Quick 3D

Qt Quick 3D - Particles 3D Testbed Example

Demonstrates how to use the Qt Quick 3D Particles3D module

Qt Quick 3D - 拾取范例

Demonstrates picking of models

Qt Quick 3D - Principled 材质范例

Demonstrates the use of Principled Material

Qt Quick 3D - 程序纹理范例

Demonstrates how to provide custom texture data from C++ or QML

Qt Quick 3D - 快速球范例

Demonstrates how to create a simple game using Quick3D

Qt Quick 3D - Quick 项范例

Demonstrates the use of Qt Quick Items in Quick 3D scene

Qt Quick 3D - Reflection Probes Example

Demonstrates the use of reflection probes in Qt Quick 3D

Qt Quick 3D - RuntimeLoader Example

Demonstrates how assets can be loaded at runtime

Qt Quick 3D - Scene Effects Example

Demonstrates the use of ExtendedSceneEnvironment

Qt Quick 3D - Screen Space Reflections Example

Demonstrates reflections in Qt Quick 3D

Qt Quick 3D - Simple Fog Example

Demonstrates how to enable fog in the 3D scene

Qt Quick 3D - 简单蒙皮范例

Demonstrates how to render a simple skinning animation in Qt Quick 3D

Qt Quick 3D - 子网格范例

Demonstrates how assign materials to sub-meshes

Qt Quick 3D - View3D 范例

Demonstrates the use of View3D to show a scene from multiple cameras

Qt Quick 3D Physics

Qt Quick 3D Physics - Cannon Example

Demonstrates how to spawn physical objects

Qt Quick 3D Physics - CharacterController Example

Demonstrates the CharacterController type

Qt Quick 3D Physics - Compound Shapes Example

Demonstrates using complex collision shapes

Qt Quick 3D Physics - Custom Shapes Example

Demonstrates using different shapes

Qt Quick 3D Physics - Impeller Example

Demonstrates using trigger bodies and collision info

Qt Quick 3D Physics - Mass Example

Demonstrates different ways of setting mass and inertia of a body

Qt Quick 3D Physics - Material Example

Demonstrates using physical materials

Qt Quick 3D Physics - Simple Example

Demonstrates setting up a simple physics scene

Qt Quick Controls

File System Explorer

A QML app utilizing customized Qt Quick Controls to display text files from a filesystem

Qt Quick Controls - Attached Style Properties Example

Demonstrates use of QQuickAttachedPropertyPropagator

Qt Quick Controls - Contact List

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

Qt Quick Controls - Event Calendar

A simple event calendar

Qt Quick Controls - Flat Style

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

Qt Quick Controls - 画廊

A gallery of controls

Qt Quick Controls - 想象风格范例:汽车

An automotive user interface using custom Imagine style assets

Qt Quick Controls - 文本编辑器

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

Qt Quick Controls - To Do List

To do list application for iOS

Qt Quick Controls - 可穿戴演示

Demonstrates an application launcher designed for wearable devices

Qt Quick Effect Maker

Wiggly

Demonstrates how to use an effect created with the Qt Quick Effect Maker (QQEM)

Qt Remote Objects

Model-View Client

Developing a very simple client program which displays the content and changes made on a server

Model-View Server

Developing a simple server program that displays and makes changes to a QTreeView which is made available on a Remote Objects network

QtRemoteObjects WebSockets Applications

Using a non-QIODevice-based transport (QWebSocket) with QtRemoteObjects

SSL Server and Client

Setting up a secure Remote Object network using QSslSockets

Simpleswitch Direct Server and Client

A minimalist Remote Object server and client

Time Client Application

A client who holds a replica of a time object from a server and displays the time in a clock

Time Server Application

A server which shares a time object with connected clients

Qt SCXML

SCXML Calculator

An application that implements the Calculator example presented in the SCXML Specification

SCXML FTP Client

Implements a simple FTP client using a state machine

SCXML Invoke

Invokes a compiled nested state machine

SCXML Media Player

Sends data to and receives it from a C++ data model

SCXML Sudoku

Demonstrates the use of separate javascript file with SCXML

SCXML Traffic Light (Dynamic, QML)

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

SCXML Traffic Light (Dynamic, Widgets)

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

SCXML Traffic Light (Simple, QML)

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

SCXML Traffic Light (Static, QML)

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

SCXML Traffic Light (Static, Widgets)

A widget-based 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 SQL Table

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

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

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

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 shows how to use table views with a relational model to visualize the relations between items in a database

SQL Browser

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

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

表格模型范例

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

Qt Sensors

Sensors Showcase

Sensors Showcase example demonstrates sensor usage with visual examples

Qt Serial Bus

CAN 总线管理器

Example sends and receives CAN bus frames

Modbus Client

Example implements a Modbus client application

Modbus 自定义命令

Example shows how to handle custom Modbus function codes

Modbus 服务器

Example implements a Modbus server application

Qt Serial Port

Blocking Receiver

Shows how to use the synchronous API of QSerialPort in a non-GUI thread

Blocking Sender

Shows how to use the synchronous API of QSerialPort in a worker thread

Serial Terminal

Shows how to use various features of QSerialPort

Qt Spatial Audio

Spatial Audio Panning Example

Shows some of the capabilities of the spatial audio engine in Qt

Qt State Machine

Move Blocks

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

Ping Pong States

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

Rogue

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

Traffic Light

Traffic Light example shows how to use Qt State Machine Overview to implement the control flow of a traffic light

Qt TextToSpeech

Hello 说话范例

Hello Speak example reads out user-provided text

Quick Speech Example

Quick Speech example reads out user-provided text

Qt UI Tools

文本查找器

Dynamically loading .ui files using QUiLoader

Qt Virtual Keyboard

Virtual Keyboard in Qt Quick

This example shows how to use the virtual keyboard in a Qt Quick application

Qt Wayland Compositor

Custom Extension

Custom Extension shows how to implement a custom Wayland extension

Custom Shell

Custom Shell shows how to implement a custom shell extension

Fancy Compositor

Fancy Compositor is an example that demonstrates how to write a fancy Wayland compositor in pure QML

IVI Compositor

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

Minimal CPP

Minimal CPP is an example that demonstrates how to write a Wayland compositor in C++

Minimal QML

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

Multi Output

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

Multi Screen

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

Overview Compositor

Overview Compositor shows how to switch between clients in a grid

QtShell Compositor

QtShell Compositor shows how to use the QtShell shell extension

Server Side Decoration Compositor

Server Side Decoration Compositor is a simple example that demonstrates server side window decorations on xdg-shell

Spanning Screens

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

Qt WebChannel

Qt WebChannel ChatClient HTML 范例

A HTML/JavaScript client that communicates over a WebSocket with a QWebChannel server

Qt WebChannel ChatClient QML Application

A QML client that communicates over a WebSocket with a QWebChannel server

Qt WebChannel ChatServer 范例

A simple chat server implemented using the QWebChannel C++ API

Qt WebChannel 独立范例

A simple chat between a server and a remote client running in a browser

Qt WebEngine

食谱浏览器

Injecting custom stylsheets into web pages and providing a rich text preview tool for a custom markup language

WebEngine 内容操纵范例

Demonstrates how to load and manipulate web content

WebEngine Cookie 浏览器范例

A cookie browser based on Qt WebEngine Widgets

WebEngine 生命周期范例

Freezes and discards background tabs to reduce CPU and memory usage

WebEngine 通知范例

Demonstrates how to pass HTML5 web notifications to users

WebEngine Push Notifications Example

Demonstrates how to subscribe to and unsubscribe from push notifications

WebEngine Quick 纳米浏览器

A web browser implemented using the WebEngineView QML type

WebEngine Widgets Client Certificate Example

A simple client certificate authentication scenario using Qt WebEngine and QSslServer

WebEngine Widgets Html2Pdf 范例

Converts web pages to PDF documents using Qt WebEngine

WebEngine Widgets 地图范例

Demonstrates how to handle geolocation requests

WebEngine Widgets PrintMe 范例

Demonstrates how to print web pages using Qt WebEngine Widgets

WebEngine Widgets 简单浏览器范例

A simple browser based on Qt WebEngine Widgets

WebEngine Widgets 拼写检查器范例

Integrates a spellchecker into a simple HTML form

WebEngine Widgets 视频播放器范例

Displays full screen video using QWebEngineView

Qt WebSockets

QML WebSocket Client

Explains how to write a QML WebSocket client example

QML WebSocket Server

A simple example that shows how to use a QML WebSocketServer

Secure WebSocket Echo Client

A simple client application using secure WebSockets (wss)

Secure WebSocket Echo Server

A simple server to respond to clients over secure WebSockets (wss)

Simple WebSocket Chat

A minimal chat application using the WebSocket protocol

WebSocket Echo Client

Show how to write a simple WebSocket client application

WebSocket Echo Server

Show how to write a simple WebSocket server application

Qt WebView

Qt WebView 范例 - Minibrowser

Minibrowser example demonstrates how to use the Qt WebView module with Qt Quick

Qt Widgets

40000 个芯片

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

Address Book

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 work

指针式时钟

Analog Clock example shows how to draw the contents of a custom widget

基本绘制范例

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

基本排序/过滤模型范例

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

计算器范例

Example shows how to use signals and slots to implement the functionality of a calculator widget, and how to use QGridLayout to place child widgets in a grid

日历 Widget 范例

Calendar Widget example shows use of QCalendarWidget

碰撞小鼠范例

Demonstrates how to animate items on a graphics view

色彩编辑器工厂范例

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

组合框 Widget 映射器范例

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

补全器范例

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

自定义补全器范例

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

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

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

简图场景示例

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

拖放 Robot 范例

Demonstrates how to drag and drop items in a graphics view

可拖曳图标范例

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

可拖曳文本范例

Illustrates how to drag and drop text between widgets

掉落站点范例

Example shows how to distinguish the various MIME formats available in a drag and drop operation

缓和曲线范例

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

回显插件范例

This example shows how to create a Qt plugin

可编辑树模型范例

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

弹性节点范例

Demonstrates how to interact with graphical items in a scene

抓取更多范例

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

流式布局范例

Shows how to arrange widgets for different window sizes

冻结列范例

This example demonstrates how to freeze a column within a QTableView

采用 Qt Widgets 快速入门编程

A tutorial for Qt Widgets based notepad application

渐变

Shows how gradients can be used with QPainter

组框范例

Group Box example shows how to use the different kinds of group boxes in Qt

图像合成范例

展示 QPainter 中的合成模式如何工作

图像手势范例

Demonstrates the use of simple gestures in a widget

许可向导范例

License Wizard example shows how to implement complex wizards in Qt

行编辑范例

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

菜单范例

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

订购表单范例

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

描绘器路径范例

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

路径描边

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

QRegularExpression 范例

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

涂鸦范例

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

设置编辑器范例

Settings Editor example shows how Qt's standard settings support is used in an application by providing an editor that enables the user to view the settings for installed applications, and modify those that can be edited

Shortcut Editor Example

Shortcut Editor example shows how to create a basic, read-write hierarchical model to use with Qt's standard view and QKeySequenceEdit classes. For a description of Model/View Programming, see the Model/View Programming overview

简单锚点布局范例

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

简单树模型范例

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

滑块范例

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

自旋框委托范例

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

自旋框范例

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

电子表格

Spreadsheet example shows how to create a simple spreadsheet application

标准对话框范例

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

星号委托范例

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

样式插件范例

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

句法高亮范例

Syntax Highlighter example shows how to perform simple syntax highlighting

系统托盘图标范例

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

选项卡对话框范例

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

数位板范例

This example shows how to use a Wacom tablet in Qt applications

Taking a Screenshot

Screenshot example shows how to take a screenshot of the desktop

触摸旋钮范例

Shows how to create custom controls that accept touch input

变换范例

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

半透明背景

Example shows how to make a round window with a translucent background

树模型补全器范例

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

通俗向导范例

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

撤消框架范例

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

向量变形

Demonstrates how to manipulate the elements of a QPainterPath

Widget 画廊范例

Widgets Gallery example shows widgets relevant for designing UIs

Widget 教程 - 子级 Widget

Widget 教程 - 创建窗口

Widget 教程 - 嵌套布局

Widget 教程 - 使用布局

窗口标志范例

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

Qt XML

DOM Bookmarks Application

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