Hide cursor with Pyside6?
Unsolved
Qt for Python
-
How can I hide the cursor with pyside6 in the qml? I have tried a few ways but I am not getting anything. I have searched both forum and online and cannot find anything.
Here is my current QML:
import QtQuick import QtQuick.Window import QtQuick.Controls import QtMultimedia Window { id: window width: 1920 height: 1080 visible: true color: "#1a2c47" title: qsTr("EveryScreen - Digital Sign Display") property int inactivityTimeout: 3000 MouseArea { anchors.fill: parent hoverEnabled: true onEntered: { back_button.visible = true Qt.application.overrideCursor = Qt.ArrowCursor; // Set the cursor to arrow when mouse enters inactivityTimer.restart() } onExited: { inactivityTimer.restart() } } Timer { id: inactivityTimer interval: inactivityTimeout repeat: false onTriggered: { back_button.visible = false Qt.application.overrideCursor = Qt.BlankCursor; // Restore cursor on inactivity } running: true } TextField { id: pininput y: 772 width: 342 height: 77 color: "#ffffff" anchors.bottom: parent.bottom anchors.bottomMargin: 231 horizontalAlignment: Text.AlignHCenter maximumLength: 6 anchors.horizontalCenter: parent.horizontalCenter font.pointSize: 39 hoverEnabled: false placeholderTextColor: "#85ffffff" placeholderText: qsTr("Enter Pin") onAccepted: { loading_text.visible = true; pininput.visible = false; networkManager.submit_pin(pininput.text, screenIndex); // Emit signal when pin is submitted } background: Rectangle { color: "transparent" // The fill color of the rectangle border.color: "white" // The color of the border border.width: 0 // Set the width of the top, left, and right borders to 0 Rectangle { width: parent.width height: 2 // The height of the bottom border color: "white" // The color of the bottom border anchors.bottom: parent.bottom } } } Text { id: home_screen_text y: 284 color: "#ffffff" text: qsTr("SCREEN ") + screenIndex font.pixelSize: 65 clip: false anchors.horizontalCenter: parent.horizontalCenter } Video { id: video opacity: 1 anchors.fill: parent source: "" transformOrigin: Item.Center playbackRate: 1 z: 0 loops: MediaPlayer.Infinite onErrorOccurred: function(error, errorString) { console.error("Playback error: " + errorString); } focus: true Connections { target: mediaManager onMediaReady: { var screenIndexFromSignal = Number(arguments[0]); // First emitted value var filePath = arguments[1]; // Second emitted value if (screenIndex === screenIndexFromSignal) { // Check if signal is for this screen loading_text.visible = false; back_button.visible = true; video.source = "file:///E:/qtprojects/everyscreen-sign-display/" + filePath; // Use the received filePath video.play(); } } } } Rectangle { id: back_button x: 60 y: 60 visible: false width: 100 height: 70 color: "#0bffffff" Image { id: back anchors.fill: parent anchors.leftMargin: 20 anchors.rightMargin: 20 anchors.topMargin: 10 anchors.bottomMargin: 10 source: "images/back.svg" fillMode: Image.PreserveAspectFit } } Text { id: loading_text x: 856 y: 507 visible: false color: "#ffffff" text: qsTr("Loading...") font.pixelSize: 50 Connections { target: networkManager onRequestFinished: { console.log("Request finished"); } } } }