I created a triangle:
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
painter.setPen(QColor("#d4d4d4"));
QRectF rect = QRectF(100, 50, 300, 100);
QPainterPath path;
painter.setBrush(QBrush("#D2691E"));
path.moveTo(rect.left() + (rect.width()/2), rect.top());
path.lineTo(rect.bottomLeft());
path.lineTo(rect.bottomRight());
path.lineTo(rect.left() + (rect.width() / 2), rect.top());
painter.fillPath(path, QBrush(QColor ("#D2691E")));
Now I want it to move smoothly on the x coordinate. How can I make it?