Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    [Solved]QPixmap being clipped after rotation

    General and Desktop
    1
    2
    1091
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      stereomatching last edited by

      @

      QImage img("lena.jpg");

      rotate_image_implace(img, angle); //rotate the img with angle degrees
      graph_pixmap_->setPixmap(QPixmap::fromImage(img));
      graph_scene_->setSceneRect(img.rect());

      @

      type of graph_pixmap_ is QGraphicsPixmapItem
      type of graph_scene_ is QGraphicsScene

      This may clip the image if their height and width are different, how could
      I rotate the image without clipping it?

      Because the program need to save the image after rotating and mirror(vertical and horizontal),
      rotation of QGraphicsPixmapItem is not adopted.

      1 Reply Last reply Reply Quote 0
      • S
        stereomatching last edited by

        After struggling of several hours, I find out that my scaling methods has some bugs, sorry to
        bother you all.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post