Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Application on Rasppberry, Mouse events are passed to the Raspbian Desktop
Forum Updated to NodeBB v4.3 + New Features

QML Application on Rasppberry, Mouse events are passed to the Raspbian Desktop

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qml
1 Posts 1 Posters 159 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alizadeh91
    wrote on last edited by
    #1

    I have developed a simple QML application and I run with cross-compiling on the target device (RPI with a touchscreen).

    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtQuick.Controls 2.12
    
    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        // Not helping
        MouseArea {
            anchors.fill: parent;
            hoverEnabled: true
        }
    
        Button {
            text: "quit";
            onClicked: Qt.quit()
            anchors.centerIn: parent;
            width: 300
            height: 250
        }
    }
    

    The problem that is confused me is that when I touch anywhere in the application, the underlying desktop (RPI desktop) is also touched. It means that all mouse or touch events are forwarded to the back screen which is Raspbian Desktop.

    This is my sample code. (it's not the code issue. I think it should be related to EGLFS or something else in the os)

    Any hints will be appreciated.

    UPDATE:

    I found that the problem occurred only if I run the app with "-platform eglfs" arguments. Still don't understand how to prevent that :|

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved