So i am making a widget that acts a “start menu” it is supposed to open a floating black box (for now just for test) and it opens like this:
my main.qml file looks like this:
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.plasma.plasmoid 2.0
PlasmoidItem {
id: root
implicitWidth: 32
implicitHeight: 32
property bool hovered: false
// 🔹 PLACEHOLDER START MENU POPUP
Popup {
id: startMenu
modal: false
focus: true
width: 300
height: 400
background: Rectangle {
color: "black"
radius: 12
}
// Close when clicking outside
closePolicy: Popup.CloseOnPressOutside
}
Orb {
anchors.fill: parent
hovered: root.hovered
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: root.hovered = true
onExited: root.hovered = false
// 🔹 LEFT CLICK OPENS MENU
onClicked: {
if (startMenu.visible) {
startMenu.close()
} else {
startMenu.open()
}
}
}
}
Running the latest version of Kde plasma on fedora on a wayland session.
