Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-118715

Qt ComboBox Detached from Application Window on Wayland.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.15.15, 5.15.16
    • None
    • Linux/Wayland

    Description

      Description:

      When using a Qt ComboBox within a widget application on ubuntu with the Wayland and Qt5.15.x, the ComboBox is not grouped with the application window. Moving the application window results in the ComboBox becoming detached and remaining fixed at its initial location on the screen.

      Steps to Reproduce:

      1. Create a new Widget project and add the code Given below to main.cpp
      2. Build and Run the Application
      3. Open Combo box 
      4. Try to drag Application window 
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          // Create a QWidget to hold the combo box
          QWidget window;
          window.setWindowTitle("Qt Combo Box Example");
          window.setGeometry(100, 100, 300, 200);
          // Create a combo box
          QComboBox comboBox(&window);
          // Add items to the combo box
          comboBox.addItem("Option 1");
          comboBox.addItem("Option 2");
          comboBox.addItem("Option 3");
          window.show();
          return app.exec();
      } 

      Expected Behavior:

      The ComboBox should move together with the application window, maintaining a consistent position relative to the window.

      Actual Behavior:

      The ComboBox becomes detached from the application window and remains at its initial position on the screen when the application window is moved.

      Check Attached Video for reference :

      Additional Information:

      The issue is only reproducible on  Ubuntu using the Wayland. It does not occur on Xorg display servers.
      The ComboBox should be correctly attached to the application window, ensuring a consistent user experience.

      Environment:

      •  Operating System: Ubuntu 20.04, 22.04
      •  Display Server: Wayland
      •  Application Type: Widget-based
      •  Gnome version: 42.9 

      Attachments

        1. ComboBoxBug.webm
          642 kB
        2. QTBUG-118715.tar.gz
          0.8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            alrizwan Alber Rizwan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes