Qt 6.5 mouse cursor icon not changing

89 Views Asked by At

After migrating to Qt6.5 (from Qt6.4) on Debian 11.7, and installing the library libxcb-cursor0, some mouse cursor icons are not appearing anymore.

Everything was working before.

main.cpp

#include <QGuiApplication>
#include <QQmlApplicationEngine>

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QQmlApplicationEngine engine;
    QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed,
        &app, []() { QCoreApplication::exit(-1); },
        Qt::QueuedConnection);
    engine.loadFromModule("Test", "Main");

    return app.exec();
}

Main.qml

import QtQuick
import QtQuick.Window

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    MouseArea {
        anchors.fill: parent
        cursorShape: Qt.SplitVCursor
    }
}

Qt.SplitVCursor doesn't appear (I see the default arrow), but Qt.SizeVerCursor works.

I have the same problem with other icons, for example the forbidden one.

Qt documentation is talking about a conversion between cursor type and cursor name: https://doc.qt.io/qt-6/qcursor.html

Checking the content of the folder: /usr/share/icons/mate/cursors

Qt::SizeVerCursor -> size_ver (there is an icon with this name in the folder)

Qt::SplitVCursor -> split_v (there is NOT an icon with this name in the folder)

0

There are 0 best solutions below