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

QGraphicsScene never gets activated inside QTabWidget after dynamically inserting a tab

XMLWordPrintable

      1) hit "a" to insert a new tab into the tabwidget
      2) switch to the second tab
      3) try to click on the QTextEdit to give it focus
      4) the QTextEdit never gets focus, however still recieves keyboard input.

      The scene's isActive function returns false and thus never passes the focusInEvent on to the QGraphicsItem.

      I believe this is the reason. When the QGraphicsView is inserted into the QTabWidget. The widget is hidden, thus setting activationRefCount in the QGraphicsScene to -1 and the subsequent show call would set activationRefCount to zero. This would then never allow the QGraphicsScene to be active.

      I am actually using the head 4.7 branch. Also tested on qt 4.6.2. I attached a sample application.

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

            kavi Kalle Viironen
            steno Jon Mullen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes