Results 1 to 2 of 2

Thread: Zoom in Problem for QPixmap

  1. #1
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Zoom in Problem for QPixmap

    Hi,
    I have a Jpeg image of 2500*2500. But i have a QWidget to dispaly map is of 1040*740 size. When i scaled down that pixmap to 1040*740 using (QPixmap::scaled(QSize(geometry().width(),geometry ().height()),Qt::KeepAspectRatio)) and drawn using
    painter.drawPixmap(0,0,geometry().width(),geometry ().height(),pixmap)
    i am able to do zoom in , pan and other functionalities like drawing painter paths with mouse move , drag and drop labels very smoothly.

    But here problem is i am lossing resolution of that pixmap.

    If i display that pixmap without scaling, i am not lossing the resolution. But remaining functionaliteies get affected. Zoom/Pan , drawing paths with mouse are not working smoothly.

    Please help me the solution to this problem so that i'll be thankful to you.

    It is very urgent please.

  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Zoom in Problem for QPixmap

    Hi,

    Most probably there is something wrong with your code. Infinite loop or something that makes your program slower in paint. Can you send a bit of the relevant code?

Similar Threads

  1. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.