Bug 510081

Summary: The org.kde.kquickcontrols QML module fails to load on Windows 11
Product: [Frameworks and Libraries] frameworks-kdeclarative Reporter: george fb <georgefb899>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: kde, kdelibs-bugs-null
Priority: NOR    
Version First Reported In: 6.18.0   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: output of running haruna after setting QT_DEBUG_PLUGINS=1

Description george fb 2025-09-30 02:33:36 UTC
Tested in Haruna and kquickcharts example. 
Pages importing the module don't load, in Haruna those are the shortcuts and custom commands settings pages and in the kquickcharts example the line chart and bar chart pages.

This happens when run from the craft environment in the terminal with craft--run haruna, directly running the executable or the craft packged version (tested both the archived and installer versions, even the older 1.1.2 version).

The weird part is that it works correctly when run through Qt Creator (setup according to https://community.kde.org/Craft#Using_Craft_with_Qt_Creator).

Error:
```
unknown() : QQmlComponent: Component is not ready

unknown() : file:///C:/Program Files/Haruna/bin/org/kde/kirigami/PageRow.qml:1078: Error: Error while loading page: qrc:/qt/qml/org/kde/haruna/qml/Settings/CustomCommandsSettings.qml:14 Cannot load library C:\Program Files\Haruna\bin\org\kde\kquickcontrols\kquickcontrols.dll: The specified module could not be found.
```
The kquickcontrols.dll exists at the above path.

STEPS TO REPRODUCE
1. Setup craft
2. run craft haruna
3. run craft --run haruna
4. open settings
5. click Shortcuts

OBSERVED RESULT
Shortcuts page is empty

EXPECTED RESULT
Shortcuts page loads

SOFTWARE/OS VERSIONS
Windows: 11 version 24H2 OS build 26100.6584
KDE Frameworks Version: 6.18
Qt Version: 6.9.1
Comment 1 David Redondo 2025-09-30 15:12:36 UTC
what is the actual location of the dll?
Comment 2 george fb 2025-09-30 15:42:22 UTC
For the installed version it's:
C:\Program Files\Haruna\bin\org\kde\kquickcontrols\kquickcontrols.dll

For the craft version it's:
C:\CraftRoot\qml\org\kde\kquickcontrols\kquickcontrols.dll

For both it's the same path as in the error.

installed version = installed through the installer created by craft and started from start menu (opens a terminal window too where the error is visible)
craft version = run from terminal in the craft environment directly C:\CraftRoot\bin\haruna.exe, as `craft --run haruna` doesn't print these errors.
Comment 3 george fb 2025-10-01 16:16:55 UTC
Created attachment 185429 [details]
output of running haruna after setting QT_DEBUG_PLUGINS=1

text below <<<< load Shortcuts settings page >>>> is the output after clicking the shortcuts button in settings
Comment 4 george fb 2025-10-03 00:39:53 UTC
I have run dependency walker (https://github.com/lucasg/Dependencies) on the kquickcontrols.dll and it complained about libkquickcontrolsprivate.dll

Copying libkquickcontrolsprivate.dll to the CraftRoot/bin folder from CraftRoot/lib fixes the issue.

I also copied it to CraftRoot/qml/org/kde/kquickcontrols, but that didn't work.
Comment 5 Bug Janitor Service 2025-10-05 10:00:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kdeclarative/-/merge_requests/265
Comment 6 george fb 2025-10-05 17:53:20 UTC
Git commit 1e36836e3dbd4b01b541fe07c1ccab978c21fcbb by George Florea Bănuș.
Committed on 05/10/2025 at 17:53.
Pushed by georgefb into branch 'master'.

kquickcontrols: install kquickcontrolsprivate to KF_INSTALL_TARGETS_DEFAULT_ARGS

M  +1    -1    src/qmlcontrols/kquickcontrols/private/CMakeLists.txt

https://invent.kde.org/frameworks/kdeclarative/-/commit/1e36836e3dbd4b01b541fe07c1ccab978c21fcbb