Kirigami module not found (Kirigami2 not installed when it is)

Hi all, please forgive me if i post my first in error here:
My primary problem is i am using KDevelop on Kubuntu 22.04 trying to go through the KDevelop basic tutorial ‘hello world’ Setting up and Getting started (KDevelop) but have come into an error, and for the life of me i cannot work out what i have done wrong.

I’m new to cmake, Qt and generally GUI’s as a whole with the exception of a little Win32 and MFC on windows. I’m ok with C++ but not an expert.

In my IDE file main.qml i have:

import org.kde.kirigami 2.20 as Kirigami

where it says “Module not found, some types or properties may not be recognized”

So when i try to build:

cmake -B build/
cmake --build build/
./build/bin/helloworld


i get the following error:
QQmlApplicationEngine failed to load component
qrc:/main.qml:4:1: module “org.kde.kirigami” version 2.20 is not installed

I have tried installing all different kirigami2-dev, kirigami-gallery and others, i’ve also tried using snap to see if that make any difference but nope.

I hope i have given enough information to make sense to someone?
Is there a way around this problem?

Given that it’s Kubuntu, I’m gonna guess that the Kirigami version you have on your system is actually lower than 2.20. Try downgrading the version used in your QML files, down to 2.15 it should be fine I believe.

1 Like

@Herzenschein Thank you so very much, yes this worked really well!

1 Like