Results 1 to 5 of 5

Thread: can we change QPixmap image of Qgraphicsscene dynamically?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2008
    Posts
    52
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: can we change QPixmap image of Qgraphicsscene dynamically?

    1 another query.

    I have added QGraphicsview in Vertical Layout to view an image.

    Now I want to rotate this image as well as move it vertically up and down.

    I am able to rotate it using code

    matrix.rotate(i);
    Qt Code:
    1. ui.BGgraphicsView->setMatrix(matrix);
    To copy to clipboard, switch view to plain text mode 

    but not able to move it up and down

    I use below code for translating
    Qt Code:
    1. matrix.translate(50,50);
    2. ui.BGgraphicsView->setMatrix(matrix);
    To copy to clipboard, switch view to plain text mode 

    Please help

  2. #2
    Join Date
    Nov 2008
    Posts
    52
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: can we change QPixmap image of Qgraphicsscene dynamically?

    SetPixmap does removes the current image from pixmap but not displaying the new pixmap image instead white empty Graphicsview is seen .

Similar Threads

  1. Saving QGraphicsScene with OpenGL to image
    By elbaschid in forum Qt Programming
    Replies: 1
    Last Post: 12th March 2009, 20:32
  2. QPixmap display on QGraphicsScene
    By febil in forum Qt Programming
    Replies: 2
    Last Post: 26th February 2009, 09:27
  3. add(draw) an icon(or image) to a QPixmap?
    By ascii in forum Qt Programming
    Replies: 4
    Last Post: 20th November 2008, 12:44
  4. Replies: 2
    Last Post: 29th September 2008, 00:08
  5. Loading a custom image into a QPixmap
    By KShots in forum Qt Programming
    Replies: 12
    Last Post: 5th August 2006, 00:16

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.