Using project and item templates
What is included
- Project template -
Qt.Bridge.CSharp AppCreates a minimal C# app wired to Qt Quick / QML. The template includes an entry QML (
Main.qml) file and a bootstrapProgram.csfile. - Item template -
Qt.Bridge.CSharp QML File (.qml)Adds a new
.qmlfile and lets the build integrate it automatically.
How to use
Install the templates
You can install the templates from local or online NuGet feed:
- From NuGet feed:
dotnet new install QtGroup.Qt.Bridge.CSharp.Templates - From a local .nupkg:
dotnet new install ./PATH/TO/QtGroup.Qt.Bridge.CSharp.Templates.0.1.0-alpha.nupkg
To verify installation, run:
dotnet new listThe new templates should appear in the list.
Create a project
To create a new Qt Quick C# project, run:
dotnet new qt -n MyQtApp
cd MyQtApp
dotnet build
dotnet runThis generates:
MyQtApp/
Project.csproj
Program.cs
Main.qmlAdd a QML item to an existing project
To add a new QML file to an existing project, in command line, change directory to the project folder and run:
dotnet new qml --FileName=MainPageThis creates MainPage.qml. The build integrates QML files automatically (they'll be registered and copied alongside your app).
Uninstall the templates
To uninstall the templates, run:
dotnet new uninstall QtGroup.Qt.Bridge.CSharp.Templates© 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.