-
-
Save leonardus/fa8fd89fa00199abfa6a59489fb43dac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Qml.Net; | |
using Qml.Net.Runtimes; | |
namespace QmlNetTesting | |
{ | |
public class CSharp | |
{ | |
public static void TestMethod() | |
{ | |
Console.WriteLine("Called C#"); | |
} | |
} | |
class Program | |
{ | |
static int Main(string[] args) | |
{ | |
RuntimeManager.DiscoverOrDownloadSuitableQtRuntime(); | |
var app = new QGuiApplication(args); | |
var engine = new QQmlApplicationEngine(); | |
Qml.Net.Qml.RegisterType<CSharp>("customtype"); | |
engine.Load("QML/Main.qml"); | |
return app.Exec(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment