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

QVideoWidget inside QListView breaks application on Wayland

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P2: Important P2: Important
    • None
    • 6.6
    • Multimedia, QPA: Wayland
    • None
    • Fedora 38, KDE Plasma Wayland
    • Linux/Wayland

      The following code shows a broken UI on Plasma Wayland

       

      MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
      {
          auto model = new QStandardItemModel;
      
          for (int i=0; i < 20; ++i) {
              auto item = new QStandardItem(QString::number(i));
              model->appendRow(item);
          }
      
          auto list = new QListView(this);
          list->setModel(model);
          auto video = new QVideoWidget(list);
          setCentralWidget(list);
      } 

      The ListView doesn't update on scrolling. On X11 this works fine.

       

      The cause is the following:

      In https://codebrowser.dev/qt6/qtbase/src/widgets/kernel/qwindowcontainer.cpp.html#78 winId() is called on the listview, i.e. not a toplevel window. On Wayland this creates a subsurface, which causes this kind of UI glitches. This is a relatively well-known problem.

      Qt is built from 6.6 branch. qtbase 1f0a31d6a6113e92f561fb9172580b5f35147450, qtmultimedia 0c496a16accde6e85a224604eec867a403b9597b

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.graphics.and.multimedia Qt Graphics Team
            nicolasfella Nicolas Fella
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes