Bug 515924 - prefix.sh QML2_IMPORT_PATH does not contain the directory "~/Qt/6.11.0/gcc_64/qml"
Summary: prefix.sh QML2_IMPORT_PATH does not contain the directory "~/Qt/6.11.0/gcc_64...
Status: REPORTED
Alias: None
Product: extra-cmake-modules
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: ecm-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-12 22:26 UTC by Marius P
Modified: 2026-02-12 22:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
/home/n/.config/kde-builder.yaml (4.26 KB, application/x-yaml)
2026-02-12 22:26 UTC, Marius P
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marius P 2026-02-12 22:26:51 UTC
Created attachment 189502 [details]
/home/n/.config/kde-builder.yaml

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY


STEPS TO REPRODUCE
1. Create a Kubuntu 25.10 virtual machine.
2. Using the Qt online installer install Qt 6.11.0-beta2 correctly including all modules and the two extensions "Qt PDF" and "Qt WebEngine" to the default install directory "~/Qt".
3. Install kde-builder. Edit ~/.config/kde-builder.yaml
  source-dir: ~/kde/src  # Directory for downloaded source code
  build-dir: ~/kde/build  # Directory to build KDE into before installing
  install-dir: ~/kde/usr  # Directory to install KDE software into
  qt-install-dir: ~/Qt/6.11.0/gcc_64  # Directory to install Qt if kde-builder supplies it
  log-dir: ~/kde/log  # Directory to write logs into
4. kde-builder kalk
5. kde-builder --run kalk
fails with error:
"QQmlApplicationEngine failed to load component
qrc:/qt/qml/org/kde/kalk/Main.qml:9:1: module "QtQuick.Controls" plugin "qtquickcontrols2plugin" not found
"

OBSERVED RESULT


EXPECTED RESULT
kalk should run correctly.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 6.11.0-beta2

ADDITIONAL INFORMATION
The fix is:
I needed to manually edit ~/kde/build/kalk/prefix.sh
and replace the line:
export QML2_IMPORT_PATH=/home/n/kde/usr/lib/x86_64-linux-gnu/qml:$QML2_IMPORT_PATH
with the line:
export QML2_IMPORT_PATH=/home/n/kde/usr/lib/x86_64-linux-gnu/qml:/home/n/Qt/6.11.0/gcc_64/qml:$QML2_IMPORT_PATH
Comment 1 Marius P 2026-02-12 22:33:28 UTC
I probably remember that this feature has worked correctly a couple of years ago.
I cannot prove that this feature worked previously, by looking at the history of  the ECM source code file "kde-modules/prefix.sh.cmake".
If this feature has never worked previously, then this is a feature request: "When Qt is not installed in "/usr" or in "~/kde/usr", then most environment variables from prefix.sh should contain the directory where Qt is installed. E.g. "~/Qt/6.11.0/gcc_64/"".
Comment 2 Marius P 2026-02-12 22:45:17 UTC
I have looked through my older notes and probably this feature has never been implemented.