Hey all, I want to use QPixmap class to show a photo on a label object.
So I code:
QPixmap pixmap;
pixmap.load(fileName);
update();
ui->iconLabel->setPixmap(pixmap);
But the picture size is not the same as iconLabel. I want to scale the size of that picture by keeping aspect ratio(Make it the same size as iconLabel)
How to realize that?Thx~


							
						
    
    
    
    
    
    
  
    
    
    
    
    
    
  
				
				
				
					
  Reply With Quote
    
    
      
    
    
    
    
  
    
    
      
    
    
    
    
  
Bookmarks