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

QWidget.pos() and geometry are incorrect in X after a Resize

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.6.2
    • None
    • OS: Ubuntu 10.4 (perhaps any X?)

      If a resize of a widget is done from the top-left of the window the pos() of the window will no longer be correct. It is not updated to reflect that the position of the window has changed. This affects both pos() and geometry().

      There is however a workaround, thus it is possible for the window to know its size.

      To get the position correctly:

      QPoint global = widget->mapToGlobal( QPoint(0,0) );
      global += (widget->pos() - widget->geometry().topLeft());

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

            earthdomain Earth Domain (Inactive)
            mortoray edA-qa mort-ora-y
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes