Problem with Image Translation

  • Hello everyone.

    I'm just beggining to use Qt's QTransform.
    I'm trying to translate a simple image but I can't do it! In the form, I have a label named "rulo" and a button wich triggers the following code when clicked.

    @void MainWindow::on_pushButton_clicked()
    QImage canvas = QImage("/home/andresdido/Descargas/ruleta.png","PNM");

    // QImage canvas;
    QTransform translating;
    QImage trasladada;
    qreal ancho = (qreal) canvas.width()/2;
    qreal alto = (qreal) canvas.height()/2;


    Both QImage's, canvas and trasladada are just the same! Just as if the translation had no effect at all. (Obviously, both Qimage's also look the same, since their "data" is perfectly equal).

    Any ideas about why the translation has no effect? Thanks!

  • I've found a similar problem here:

    But no one seems to have an answer for this :(


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.