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. Qt 5.7.1 Popup Component Modal Property Works on Windows Environment (Qt Creator) But Not On Embedded Linux Target Device That Uses X11 Window Manager
Forum Updated to NodeBB v4.3 + New Features

Qt 5.7.1 Popup Component Modal Property Works on Windows Environment (Qt Creator) But Not On Embedded Linux Target Device That Uses X11 Window Manager

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 3 Posters 174 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.
  • D Offline
    D Offline
    DylanH96
    wrote last edited by DylanH96
    #1

    Hello,

    I am reaching out in hopes that someone has come across this issue before, as it feels like I am hitting a roadblock.

    Before sharing my issue, here is some background information for context - I am developing an application in Qt Creator using Qt 5.7.1, and QtQuickControls2.0. The application I am building is to be deployed and ran on a custom embedded Linux PCB (target device). Our target device PCB is about 10 years old so the technology is outdated, but nonetheless still performs as it should. It consists of an Ubuntu OS, an AM3354 processor (not sure if this is valuable in this investigation), and uses the Wayland X11 window manager for touchscreen input on a 10" touchscreen.

    Now to touch on the issue I am having - In my application, I implemented a Popup component that displays in the middle of the screen whenever the "Delete" button is pressed (see screenshot I provided). The user must press either the "Yes" or "No" buttons within the popup for the popup to close. This behavior is done by setting the "modal" property of the Popup to true. When I run and test the behavior in Qt Creator on my Windows environment, the application works and behaves as intended, and all buttons outside/underneath the popup cannot be pressed, signifying that the "modal" property is working properly. After verifying this correct behavior on my Windows environment, I felt confident enough to generate an image file and deploy it to my target device in order to test the application further in it's runtime environment.

    Issue - When I tested the application on my target device, I verified that the Popup displayed correctly as intended in the middle of the screen, which was good. However, to my surprise I found that all buttons outside/underneath the Popup were able to be pressed, thus allowing the non popup buttons to fire their applicable functions and commands to change screens. Basically, the modal property does not work on my target device, but it works on my Windows environment. This is the current state of where I am at in this issue.

    Now to provide some detail thus far in in my week long investigation - The logic I used in my very first implementation of the popup contained the Popup in an item as it's own component (own QML file). Then, I injected the Popup inside a different custom QML screen for it to display. In my first implementation within the Popup component, I did not manually set the position using "X" or "Y" coordinates, but instead used anchors. The popup displayed and behaved exactly as intended in my Windows environment, and looked like the screenshot example I uploaded. After verifying this, I then generated an image file and tested the application on my target device. However, the popup did not render and display properly as it was positioned on the left side of the screen and also was down scaled in size. However, the modal property was actually working properly and I was not able to press any buttons outside/underneath the popup. At this point in time, I did not have the modal issue I am now seeing, and only thought that I needed to fix the rendering issue of the popup.

    After much research and testing, I updated the logic of the confirmation popup window to remove it from being in an Item, and instead just left it as a standalone component. Simply meaning, my custom QML file just has the Popup component. I also removed anchor positioning and instead manually set the Popup using "X" and "Y" coordinates. After verifying this again on my Windows environment, I deployed it to my target application and verified the updated logic allowed the popup to display correctly as intended on the touchscreen. However, the "modal" property of the Popup didn't work and that was the first time I saw the issue of being able to press buttons outside/underneath the Popup. To reiterate, this is the current state on where I am at with this issue.

    This was an exhaustive explanation, but I wanted to share not only the issue but also what I have experienced so far in my investigation. I have also tried injecting the Popup component within my "main.qml" file and verified the Popup had my "ApplicationWindow" as it's parent, but still no luck. I realize I probably did not provide all of the information that's needed, and I can certainly provide my code, so please let me know if there is any other additional information I need to provide to help with my issue. I really appreciate it.
    PopupWindow.png

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

      Hi,

      Just to be sure about your system:
      Are you using Wayland's X11 integration ?
      Why not X11 only or Wayland only ?

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

      D 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Just to be sure about your system:
        Are you using Wayland's X11 integration ?
        Why not X11 only or Wayland only ?

        D Offline
        D Offline
        DylanH96
        wrote last edited by DylanH96
        #3

        @SGaist Hey there, thanks for the quick response.

        I want to apologize for my arrogance, I believe I misspoke when I specifically referenced Wayland X11.

        I looked at all the packages that are installed when we build the image, and I found two packages relating to X11.
        .DBusX11.png LibX11.png

        I am not sure if this verifies if we are using X11 only, but it seems like it's pointing to it. Please forgive me, I am not the firmware/embedded developer that set up the build environment so I am not exactly sure how to 100% verify the window manager that is used on the target device. I have access to all the build files and the build environment so I can provide further information to you if needed. I can also provide code as well.

        Also, I wanted to provide some clarification with the issue I have. When the popup is displayed, all buttons outside/underneath the popup can be pressed and it will fire the function or screen change command of the button that was pressed. When this happens, the popup itself still displays on the screen, even if the screen has changed in the background. Lastly, I want to point out that I have the Popup's close policy set to "Popup.NoAutoClose", but still am seeing the issue. I hope this can provide more clues.

        jsulmJ 1 Reply Last reply
        0
        • D DylanH96

          @SGaist Hey there, thanks for the quick response.

          I want to apologize for my arrogance, I believe I misspoke when I specifically referenced Wayland X11.

          I looked at all the packages that are installed when we build the image, and I found two packages relating to X11.
          .DBusX11.png LibX11.png

          I am not sure if this verifies if we are using X11 only, but it seems like it's pointing to it. Please forgive me, I am not the firmware/embedded developer that set up the build environment so I am not exactly sure how to 100% verify the window manager that is used on the target device. I have access to all the build files and the build environment so I can provide further information to you if needed. I can also provide code as well.

          Also, I wanted to provide some clarification with the issue I have. When the popup is displayed, all buttons outside/underneath the popup can be pressed and it will fire the function or screen change command of the button that was pressed. When this happens, the popup itself still displays on the screen, even if the screen has changed in the background. Lastly, I want to point out that I have the Popup's close policy set to "Popup.NoAutoClose", but still am seeing the issue. I hope this can provide more clues.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote last edited by
          #4

          @DylanH96 Check the XDG_SESSION_TYPE env variable on your device to see whether X11 or Wayland is used.
          Btw. neither X11 nor Wayland are window managers.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • D Offline
            D Offline
            DylanH96
            wrote last edited by
            #5

            Just wanted to provide an update on this -

            I was able to verify that we are using X11 on our custom board. But after much back and forth and frustration with the input blocking functionality not working on our Linux target device, I decided to manually block all MouseArea input for all the buttons (that are located outside/underneath the popup) whenever the Popup is displayed. It is a rudiment way of achieving the input blocking functionality I was after, but it works as intended. With this, this issue can be closed.

            Thank you again for the feedback.

            1 Reply Last reply
            0
            • D DylanH96 has marked this topic as solved
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote last edited by
              #6

              Another workaround I could see (but it's just an idea) is to have a transparent layer between the popup and the rest of the application so you don't have add that disabling logic everywhere.

              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
              1

              • Login

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