Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Qt C++) Resize pixmap and KEEP pixelation?

Tags:

In my project I have a QLabel that I change the pixmap frequently like this:

ui->frameLabel->setPixmap(slot_pic[blockId[currentSlot]][damageId[currentSlot]]);

slot_pic is simply a 2d map. So you can look at it clearer like this:

ui->frameLabel->setPixmap(pixmap);

The image is 16x16 in size and my label is 32x32. I have scaledContents checked so when the pixmap changes, the image is double in size. However, the image is now blurry. I understand why, but I was wondering if there is a way to make it stay pixelated. I want to just have a bigger pixelated image. (The image is from Minecraft if that helps you understand what I mean)

Thanks for your time :)