Results 1 to 5 of 5

Thread: Need Help Regarding Image panning in QT

  1. #1
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Need Help Regarding Image panning in QT

    Hi,

    I need some example to implement image panning in QT.
    Please help me with some example on how to implement image panning in QT.

    Many Thanks,
    K.Chandra Sekhar

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Need Help Regarding Image panning in QT

    Can you be more specific?
    Do you need help with the mathematics? With showing the image?

    By the way: it's considered rude by me to ask a question on multiple forums.

  3. #3
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Re: Need Help Regarding Image panning in QT

    Thanks for your reply.

    I am new to QT programming and I would like to know how to implement panning of images in QT. I need help both in mathematical way and showing the images.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Need Help Regarding Image panning in QT

    I guess the best "ready made" solution is a QGraphicsView with a scene and a QGraphicsPixmapItem.
    Use a timer. For every time out, update a value (x, y or both). Then I guess you can use the setOffset function of the pixmap item.

    Or, you could just subclass a widget, draw the image in the paint event. Again, use a timer to update values. Then draw the image panned (current x + some value or current y + some value)

    Edit: instead of a timer, you can also use a timeline.
    Or: react on mouse position for example.
    Last edited by tbscope; 28th September 2010 at 07:07.

  5. The following user says thank you to tbscope for this useful post:

    sekhar18k (28th September 2010)

  6. #5
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Re: Need Help Regarding Image panning in QT

    Thank you very much for the reply.

    Could you please give any references where we can get some sample code on panning so that we can start building on that.

    Many Thanks,
    K.Chandra Sekhar.

Similar Threads

  1. smooth panning and zooming an image, to use OpenGL or not?
    By scarleton in forum Qt Programming
    Replies: 0
    Last Post: 27th August 2010, 22:25
  2. Replies: 1
    Last Post: 23rd February 2010, 07:25
  3. QGraphicsView and panning performance
    By prashant in forum Qt Programming
    Replies: 1
    Last Post: 27th November 2009, 19:40
  4. Panning QGraphicsScene
    By prashant in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2009, 20:41
  5. Panning
    By linuxdev in forum The GraphicsView Framework
    Replies: 3
    Last Post: 30th December 2008, 06:40

Tags for this Thread

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.