これがコードです。
QPropertyAnimation *animation3 = new QPropertyAnimation (ui->modifyButton, "geometry");
animation3->setDuration(1000);
animation3->setStartValue(QRect(20, 120, 141, 20));
animation3->setStopValue(QRect(20, 70, 141, 20));
animation3->start();
modifyButtonの「Y」座標は固定されておらず、変更されているため、アプリケーションが自動的に決定する必要があります。では、どうすればこのようなことができますか。
int y = get_y_coordinate_somehow();
animation3->setStartValue(QRect(20, y, 141, 20));start();