I have a program that operates with larger images but displays smaller versions of these images. I cannot get the scaling to work properly, the result is always too large. Below is my code. Thanks.

Qt Code:
  1. //declare and make pixmap
  2. QPixmap map(600,400);
  3. map.fill(Qt::white);
  4.  
  5. //save pixmap
  6. map.save("pic.bmp", 0, -1);
  7.  
  8. //scale and display pixmap
  9. map=map.scaled(300, 200, Qt::IgnoreAspectRatio, Qt::FastTransformation);
  10. pixmapLabel->setPixmap(map);
To copy to clipboard, switch view to plain text mode