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

QRect QWidget::mapToGlobal(QPoint, QPoint);

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.7.0
    • None
    • Windows NT

    Description

      Hi,

      for the unlikely case you want to extend the QWidget interface:

      When I need to convert the widgets rectangle into global coordinates the code looks uggly:

      QWidget actWidget;
      QRect globalWidgetsRect = QRect(actWidget->mapToGlobal(QPoint(0,0)), actWidget->mapToGlobal(QPoint(actWidget->width(), actWidget->height())))

      A new function
      QRect QWidget::mapToGlobal(QPoint topLeftOffset, QPoint bottomRightOffset);
      would help.

      The method would return the widgets rectangle in global coordinates (plus the two offsets).
      Offset of 0/0 would mean no offset.
      Both offsets would be given in coordinates relative to the appropreate refference points.

      Gerhard

      Attachments

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

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            gerhard w schuster Gerhard Walter Schuster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes