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

QGraphicsProxyWidget: QTreeView editor loses focus on context menu when placed in a QGraphicsProxyWidget

    XMLWordPrintable

Details

    Description

      When a QTreeView/Widget is placed into a QGraphicsProxyWidget and displayed in a scene, right-click on the active item editor. An expected context pop-up window shows up (the Copy/Paste/Dellete/etc), but the editor closes due to focusOut event. The pop-up takes focus away from the editor. This does not happen if the widget is not in the QGraphicsProxyWidget.

      Test case:

      #include <QtGui>
      
      int main( int argc, char * argv[] )
      {
          QApplication app( argc, argv );
          QGraphicsScene scene;
          QGraphicsView view( & scene );
          QTreeWidget tree;
          QTreeWidgetItem item( QStringList() << "Hello" );
      
          item.setFlags( item.flags() | Qt::ItemIsEditable );
          tree.addTopLevelItem( & item );
          scene.addWidget( & tree );
          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

            ylopes Yoann Lopes
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes