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

Nested widgets do not get hover events when inside QGraphicsView

    XMLWordPrintable

Details

    Description

      When you have a QPushButton inside QWidget which is located in QGraphicsView, it does not get hover events if alien widgets are disabled.

      To reproduce it compile the following application and run it with environment variable QT_USE_NATIVE_WINDOWS set to a value of 1.

      Test case main.cpp to reproduce

      #include <QApplication>
      #include <QGraphicsScene>
      #include <QGraphicsProxyWidget>
      #include <QGraphicsView>
      #include <QPushButton>
      
      int main(int argc, char **argv)
      {
          QApplication app(argc, argv);
      
          QWidget *container = new QWidget;
          QPushButton* btn = new QPushButton("test", container);
      
          QGraphicsScene scene;
          QGraphicsProxyWidget *proxy = scene.addWidget(container);
          
          QGraphicsView view(&scene);
          view.show();
      
          return app.exec();
      }
      

      Attachments

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

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            dzyubenk Denis Dzyubenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes