[GH-ISSUE #163] Using with F# #102

Closed
opened 2026-05-05 11:04:50 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @aka-mj on GitHub (Aug 29, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/163

I've taken a shot at using qmlnet within an F# project:

open System
open Qml.Net
open Qml.Net.Runtimes

[<EntryPoint>]
let main argv =
    RuntimeManager.DiscoverOrDownloadSuitableQtRuntime() |> ignore

    let app = new QGuiApplication(argv)
    let engine = new QQmlApplicationEngine()
    engine.Load("Main.qml")
    app.Exec()

Running this I get the following:

QWindowsContext: OleInitialize() failed:  "COM error 0xffffffff80010106 RPC_E_CHANGED_MODE (Unknown error 0x080010106)"

Anything obvious that I'm missing? I have both Qml.Net and Qml.Net.WindowsBinaries packages added to my project.

Originally created by @aka-mj on GitHub (Aug 29, 2019). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/163 I've taken a shot at using qmlnet within an F# project: ``` open System open Qml.Net open Qml.Net.Runtimes [<EntryPoint>] let main argv = RuntimeManager.DiscoverOrDownloadSuitableQtRuntime() |> ignore let app = new QGuiApplication(argv) let engine = new QQmlApplicationEngine() engine.Load("Main.qml") app.Exec() ``` Running this I get the following: ``` QWindowsContext: OleInitialize() failed: "COM error 0xffffffff80010106 RPC_E_CHANGED_MODE (Unknown error 0x080010106)" ``` Anything obvious that I'm missing? I have both Qml.Net and Qml.Net.WindowsBinaries packages added to my project.
Author
Owner

@MaxMommersteeg commented on GitHub (Aug 29, 2019):

See issue: https://github.com/qmlnet/qmlnet/issues/65

<!-- gh-comment-id:526299790 --> @MaxMommersteeg commented on GitHub (Aug 29, 2019): See issue: https://github.com/qmlnet/qmlnet/issues/65
Author
Owner

@aka-mj commented on GitHub (Aug 29, 2019):

Thanks, I should have waited longer, the error shows after 40sec and the app window pops up after 80sec. I assumed it was dead after the error.

<!-- gh-comment-id:526302791 --> @aka-mj commented on GitHub (Aug 29, 2019): Thanks, I should have waited longer, the error shows after 40sec and the app window pops up after 80sec. I assumed it was dead after the error.
Author
Owner

@MaxMommersteeg commented on GitHub (Aug 29, 2019):

No problem. The first launch was probably slow since it was downloading the runtime. Second launch should be significantely faster.

<!-- gh-comment-id:526344734 --> @MaxMommersteeg commented on GitHub (Aug 29, 2019): No problem. The first launch was probably slow since it was downloading the runtime. Second launch should be significantely faster.
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#102
No description provided.