I have a toolbar with custom ToolButton buttons:
// main.qml
ApplicationWindow {
toolBar: ToolBar {
RowLayout {
anchors.fill: parent
spacing: 4
MyToolButton {
id: tb1OpenBtn
iconSrc: "qrc:///images/fopen.svg"
iconWidth: 24
iconHeight: 24
iconMargins: 2
onClicked: console.log("OpenBtn clicked")
}
}
}
}
// MyToolButton.qml
ToolButton {
property real iconWidth: 32
property real iconHeight: 32
property real iconMargins: 2
property url iconSrc: ""
implicitWidth: iconWidth + 2 * iconMargins
implicitHeight: iconHeight + 2 * iconMargins
Image {
anchors.fill: parent
anchors.margins: iconMargins
fillMode: Image.Pad
source: iconSrc
sourceSize.width: iconWidth
sourceSize.height: iconHeight
}
}
When running on Windows 7 – ok, single click on a toolbutton makes console log entries.
But when running on Windows 8 nothing happens. Only double click works.
Why?
↧