Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A template for a C++ Application using Slint

License

NotificationsYou must be signed in to change notification settings

slint-ui/slint-cpp-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A template for a C++ application that's usingSlint for the user interface and CMake for the build system.

About

This template helps you get started developing a C++ application with Slint as toolkitfor the user interface. It demonstrates the integration between the.slint UI markup andC++ code, how to trigger react to callbacks, get and set properties and use basic widgets.

Prerequisites

In order to use this template and build a C++ application, you need to install a few tools:

  • cmake (3.21 or newer)
  • A C++ compiler that supports C++ 20

If your target environment is Linux or Windows on an x86-64 architecture, then you may also opt into downloading one of our binary Slint packages. These are pre-compiled and require no further tools. You can find setup instructions and download links at

https://slint.dev/docs/cpp/cmake.html#install-binary-packages

Alternatively, this template will automatically download the Slint sources and compile them. This option requires you to install Rust by following theRust Getting Started Guide. Once this is done, you should have therustc compiler and thecargo build system installed in your path.

Usage

  1. Download and extract theZIP archive of this repository.
  2. Rename the extracted directory and change into it:
    mv slint-cpp-template-main my-projectcd my-project
  3. Configure with CMake
    mkdir buildcmake -B build
  4. Build with CMake
    cmake --build build
  5. Run the application binary
    • Linux/macOS:
      ./build/my_application
    • Windows:
      build\my_application.exe

We recommend using an IDE for development, along with ourLSP-based IDE integration for.slint files. You can also load this project directly inVisual Studio Code and install ourSlint extension.

Next Steps

We hope that this template helps you get started and you enjoy exploring making user interfaces with Slint. To learn moreabout the Slint APIs and the.slint markup language check out ouronline documentation.

Don't forget to edit this README to replace it by yours


[8]ページ先頭

©2009-2025 Movatter.jp