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

Wrong global position with BypassGraphicsProxyWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 4.6.3
    • Widgets: GraphicsView
    • None
    • Linux, OpenSuse

    Description

      A QComboBox is contained in a widget embedded in a QGraphicsProxyWidget.
      (the combo box has a QTreeView as view here, but that should not matter)

      Hover the items, which have tooltips: Tool tips are displayed at the left edge of the screen.
      Involved is this line in QAbstractItemDelegate::helpEvent:
      QToolTip::showText(he->globalPos(), tooltip.toString(), view);

      Set the BypassGraphicsProxyWidget flag on the widget containing the combo box:
      The combo box popup is displayed to the left edge of the screen.
      (there is also a UI freeze happening here when hiding the popup again btw: event loop is in poll() but no input events processed)
      Involved is this code line in QComboBox::showPopup:
      QPoint below = mapToGlobal(listRect.bottomLeft());

      Instead of a combo box, use a KLineEdit with an autocompletion popup and the BypassGraphicsProxyWidget flag:
      The popup is displayed to the left edge of the screen.
      Involved in kdelibs code is the code line:
      d->m_parent->mapToGlobal( QPoint(0, d->m_parent->height()) );

      From the code examples given, it seems that mapping to global position for embedded widgets is broken.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            mwiesweg Marcel Wiesweg
            Votes:
            8 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes