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

QWidget::move() function make widget move twice, one with incorrect coordinates

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.0
    • 4.8.1
    • GUI: Window management
    • None
    • Mac OS X 10.6.8, Qt Creator 2.4.1, i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
    • macOS

    Description

      Sample:

      #include "mainwindow.h"
      #include "ui_mainwindow.h"
      
      #include <QtCore/QDebug>
      #include <QtGui/QMoveEvent>
      
      MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
      {
        ui->setupUi(this);
      }
      
      MainWindow::~MainWindow()
      {
        delete ui;
      }
      
      void MainWindow::on_pushButton_clicked()
      {
        move(100, 100);
      }
      
      void MainWindow::moveEvent(QMoveEvent* e)
      {
        qDebug() << e->pos();
      }
      

      After pushButton clicked output:
      QPoint(100,99) - strange point
      QPoint(100,100) - why twice?

      Attachments

        Issue Links

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

          Activity

            People

              peppe Giuseppe D'Angelo
              seralex.vi Sergei A. Vinogradov
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes