Results 1 to 2 of 2

Thread: Rotate QPixmap set on QLabel

  1. #1
    Join Date
    Mar 2009
    Posts
    116
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Red face Rotate QPixmap set on QLabel

    Hello All,

    I am new to Qt programming.

    I m using Qt 4.4.3

    I want to rotateQPixmap image set on QLabel

    I m using the below code

    QPixmap pPixCenter;
    pPixCenter.load(QString::fromUtf8("D:/Qt/4.4.3/examples/stylesheet/images/center.gif"));
    ui.CenterArc->setPixmap(pPixCenter);

    //Code for rotation

    QMatrix matrix;
    matrix.rotate(12);
    pPixCenter = pPixCenter.xForm(matrix);

    But when I compile this code it gives me error

    'Class QPixmap' has no member named 'xForm'


    why is it so......

  2. #2
    Join Date
    Mar 2009
    Posts
    116
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Rotate QPixmap set on QLabel



    Hello All,


    I was just searching for previous threads and got a solution for my problem

    I done it using below code.

    QPixmap pm1=pm.transformed(mat); //saving the changed QPixmap in a new QPixmap
    imageLabel->setPixmap(pm1); //setting changed Pixmap on the label

Similar Threads

  1. Replies: 2
    Last Post: 20th January 2009, 07:13
  2. Replies: 3
    Last Post: 17th July 2008, 07:43
  3. Rotate QLabel
    By shader76 in forum Newbie
    Replies: 9
    Last Post: 24th December 2007, 12:31
  4. paintEvent, QString to QPixmap, QLabel
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2007, 13:04
  5. QPixmap and HBITMAP
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2006, 16:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.