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

QGraphicsScene never gets activated inside QTabWidget after dynamically inserting a tab

    XMLWordPrintable

Details

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes