Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Mouse (touch) events also being passed to OS
Forum Updated to NodeBB v4.3 + New Features

Mouse (touch) events also being passed to OS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 1.4k 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.
  • Zetski210Z Offline
    Zetski210Z Offline
    Zetski210
    wrote on last edited by
    #1

    Hi there,
    I'm fairly new to Qt and have managed to get a Qt development environment running on a host laptop and being deployed on a Raspberry Pi running Rasbian with a USB touch panel.

    The issue that I have is that when I either debug/run from the remote laptop or run the program directly from the Pi, the button/slider/rectangle mouse events (or in this case, touch presses) are still being detected by the Raspberry Pi OS in the background.
    This means that upon exiting the Qt application, various things have been "clicked" and run in the background.

    Is there something I've forgotten to set/disable in the .pro file or qml files?
    Any help would be really appreciated.
    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What platform plugin are you using for your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Zetski210Z Offline
        Zetski210Z Offline
        Zetski210
        wrote on last edited by
        #3

        Hi Sgaist, thanks for your reply.
        I appologize, but I do not understand the question. How do I obtain which plugin you are referring to?

        I can conclude, however, that it is the touch driver, when using a USB corded mouse the events are constrained to the Qt application.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The embedded Linux chapter of Qt's documentation will best answer that question.

          Ok, then how are you starting your application ? (parameters etc.)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Zetski210Z Offline
            Zetski210Z Offline
            Zetski210
            wrote on last edited by
            #5

            Hi there,

            My main.qml file starts as follows:

            import QtQuick 2.0
            import QtQuick.Controls 1.0
            import QtQuick.Controls.Styles 1.0
            import com.connect 1.0
            
            Rectangle {
                id: screen
            
                width: 1024; height: 600
                color: "#101320"
            
                Connector{ id: hw_connector}
                property alias val: slider1.value
            

            with the main.cpp file:

            #include "uart.h"
            #include "connector_class.h"
            
            #include <QtGui/QtGui>
            #include <QtQuick/QtQuick>
            
            int main(int argc, char *argv[])
            {
                init_uart();
            
                QGuiApplication app(argc, argv);
            
                qmlRegisterType<Connector_class>("com.connect", 1, 0, "Connector");
            
                QQuickView view;
            
                view.setResizeMode(QQuickView::SizeRootObjectToView);
                view.setSource(QUrl(QCoreApplication::applicationDirPath() + "/qml/main.qml"));
                view.show();
            
                return app.exec();
            }
            

            I'm planning on using a single class (com.connector) back to the C++ realm to deal with the Raspberry PI's UART which communicates to a custom STM32 based embedded environment. This is currently being emulated whilst the HW is being developed.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Sorry, I meant when you start your application, what parameters do you pass on the command line ?

              Does init_uart use any QObject ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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