Qt Core Examples

To learn how to use features of the Qt Core module, see examples:

Bindable Properties

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

Calendar Backend Plugin Example

QCalendar example illustrating user-supplied custom calendars.

Contiguous Cache Example

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.

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

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.

Parsing and displaying CBOR data

A demonstration of how to parse files in CBOR format.

Producer and Consumer using Semaphores

The 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

The 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 Bookmarks Example

Demonstrates how to read and write XBEL files.

Qt for Android Notifier

Demonstrates calling Java code from Qt in an Android application.

Queued Custom Type

The 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.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.