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 click events in Arm build
Forum Updated to NodeBB v4.3 + New Features

Mouse click events in Arm build

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 2 Posters 652 Views
  • 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.
  • Balaji RamB Offline
    Balaji RamB Offline
    Balaji Ram
    wrote on last edited by
    #1

    Hello all,

    I have a piece of my Qt code that has worked without issues on x86 architecture for many years.
    But, when the code was recently ported to Arm, an issue appeared.

    I have pasted a sample code below :

    // Parent QuickWidget for all the other widgets...
    m_DeskLayout = new QQuickWidget();
    m_DeskLayout->setObjectName("RootQW");
    m_DeskLayout->setGeometry( 0, 0, instWidth, instHeight );
    m_DeskLayout->setFixedSize(instWidth, instHeight);

    // mouse events work in mainQmlWidget when created here...
    m_mainQmlWidget = new QQuickWidget(m_DeskLayout);
    m_mainQmlWidget->setObjectName("MainQW");
    m_mainQmlWidget->setSource(QUrl("qrc:/main.qml" ));
    m_mainQmlWidget->setEnabled(true);
    m_mainQmlWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
    m_mainQmlWidget->setGeometry(0, 35, 1024, 665);

    // Show using the top level QQuickWidget...
    m_DeskLayout->show();

    // ------ Mouse does not work in mainQmlWidget when created after show() ------
    // m_mainQmlWidget = new QQuickWidget(m_DeskLayout);
    // m_mainQmlWidget->setObjectName("MainQW");
    // m_mainQmlWidget->setSource(QUrl("qrc:/main.qml" ));
    // m_mainQmlWidget->setEnabled(true);
    // m_mainQmlWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
    // m_mainQmlWidget->setGeometry(0, 35, 1024, 665);
    // ------ Mouse does not work in mainQmlWidget when created after show() ------

    In the above code, if "mainQmlWidget" is created after its parent's show() has been called, mouse events do not work as expected. Any click on the widgets that are hosted in main qml does not receive mouse events. It acts as though mainQmlWidget is transparent to mouse clicks.
    On the other hand, if "mainQmlWidget" is created before its parent's show() is called, mouse events work ok.

    The existing code base largely relies on being able to create the "mainQmlWidget" at anytime when needed.
    So, trying to work around this behavior only for Arm build is proving hard.

    Any help please, if there is any additional change needed to get this working on Arm
    when "mainQmlWidget" is created even after its parent's show() has been called ?

    I am testing the Arm build on a Xilinx Zynq UltraScale+ MPSoC ZCU102 Evaluation Kit that has Qt 5.9.6 installed in it.

    Thank you for your time.

    Cheers,

    Balaji Ram

    1 Reply Last reply
    0
    • Balaji RamB Offline
      Balaji RamB Offline
      Balaji Ram
      wrote on last edited by
      #2

      Any directions or thoughts please ?

      aha_1980A 1 Reply Last reply
      0
      • Balaji RamB Balaji Ram

        Any directions or thoughts please ?

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Balaji-Ram

        • do you use the exact same Qt version on x86?
        • can you update Qt to 5.12.x or 5.13 (at least for tests)?

        Qt has to stay free or it will die.

        1 Reply Last reply
        0
        • Balaji RamB Offline
          Balaji RamB Offline
          Balaji Ram
          wrote on last edited by
          #4

          Thanks for your reply.

          Yes, It is the same Qt version in x86 and it works.

          Sure, I will try upgrading the Qt version to the latest and give it a try on Arm.

          This could take me some time to try out as Petalinux tools 18.3 which is the latest available today from Xilinx comes with Qt 5.9.6.
          Changing that will require me to rebuild Petalinux with a different Qt version, but I think it is doable and will try it.

          Thank you.

          aha_1980A 1 Reply Last reply
          0
          • Balaji RamB Balaji Ram

            Thanks for your reply.

            Yes, It is the same Qt version in x86 and it works.

            Sure, I will try upgrading the Qt version to the latest and give it a try on Arm.

            This could take me some time to try out as Petalinux tools 18.3 which is the latest available today from Xilinx comes with Qt 5.9.6.
            Changing that will require me to rebuild Petalinux with a different Qt version, but I think it is doable and will try it.

            Thank you.

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Balaji-Ram

            I just thought about this issue again. I don't think ARM vs. x86 makes the difference.

            But probably the Qt platform plugin backend used for input/output handling and graphics are different to your desktop build. Not sure if this brings any new information or help, just a thought.

            In case you have a Qt licences, you should contact the support, they might have more detail knowledge and pinpoint the problem.

            Regards

            Qt has to stay free or it will die.

            1 Reply Last reply
            3
            • Balaji RamB Offline
              Balaji RamB Offline
              Balaji Ram
              wrote on last edited by
              #6

              One of my colleague upgraded to different Qt versions and upgrading to the latest Qt version helped.
              These were the versions tried and its result
              Qt 5.9.4 : failed
              Qt 5.12.4 : ok
              Qt 5.13.0 : ok

              Thank you.

              Balaji Ram

              1 Reply Last reply
              1

              • Login

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