[GH-ISSUE #72] Removal of the private headers. #45

Open
opened 2026-05-05 11:01:12 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @pauldotknopf on GitHub (Sep 24, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/72

In order to make our compiled lib more portable, we need to not depend on any *-private headers from QML.

We are currently using core-private. We use it to generate dynamic QObject definitions with custom methods/properties/signals.

To get around this, we'd need to generate C++ classes from C# classes. The generated C++ will contain all the code needed to manipulate/interact with the underlying .NET type.

Also, with the generated C++ classes, we'd have support for intellisense in Qt Creator.

Note, this approach wouldn't work with the Qml.Net.*Binaries NuGet packages. You'd have to manually compile the libQmlNet.so shim for your platform of your choice with the generated C++ classes baked in.

There should also be a compile-time option to enable "strict mode" which will throw exceptions if you attempt to pass a .NET object to QML that doesn't have a matching generated C++ type.

Originally created by @pauldotknopf on GitHub (Sep 24, 2018). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/72 In order to make our compiled lib more portable, we need to not depend on any ```*-private``` headers from QML. We are currently using ```core-private```. We use it to generate dynamic ```QObject``` definitions with custom methods/properties/signals. To get around this, we'd need to generate C++ classes from C# classes. The generated C++ will contain all the code needed to manipulate/interact with the underlying .NET type. Also, with the generated C++ classes, we'd have support for intellisense in Qt Creator. Note, this approach wouldn't work with the ```Qml.Net.*Binaries``` NuGet packages. You'd have to manually compile the ```libQmlNet.so``` shim for your platform of your choice with the generated C++ classes baked in. There should also be a compile-time option to enable "strict mode" which will throw exceptions if you attempt to pass a .NET object to QML that doesn't have a matching generated C++ type.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#45
No description provided.