Hi,
I have a png image I am trying to display on the full width and height of my lcd (800x480).
I have a QGraphicsScene inside a QGraphicsView, and I am using a QGraphicsPixmapItem in the scene.
The png image is not displaying 800x480, instead it is scaled slightly by a few pixels. ( approximately 797x478). I can see the background image outline around the image, I want to cover the whole screen. I check the size of the image and it is 800x480. If I use that same image in a splash screen or main background it covers the whole screen.
I am converting to 16bit because of my display. Anyways, with or without the conversion it is the same
Using QtEmbedded 4.4.1
LCD is 16bit 800x480
Image specifications, I used the debug to show these
Width=800
Height=480
Format=QImage::Format_RGB32
DotsPerMeterX,Y = 2835
Depth=32
Any suggestions?
Thanks.
QRectF windowBoundary
(0 ,
0,
800,
480);
QImage extIcon
(EXTFUNCKEYWINBKGICON
);
extIcon.
convertToFormat(QImage::Format_RGB16);
qDebug() << extIcon.height() << extIcon.width() << "EXTENSIONWINDOW";
extendedFuncKeyWindow->setOffset(0,0);
extendedFuncKeyWindow->setZValue(0);
extFuncKeyWinItems->addItem(extendedFuncKeyWindow);
QRectF windowBoundary(0 , 0, 800, 480);
extFuncKeyWinItems = new QGraphicsScene(windowBoundary, parent);
QImage extIcon(EXTFUNCKEYWINBKGICON);
extIcon.convertToFormat(QImage::Format_RGB16);
QGraphicsPixmapItem *extendedFuncKeyWindow = new QGraphicsPixmapItem QPixmap::fromImage(extIcon));
qDebug() << extIcon.height() << extIcon.width() << "EXTENSIONWINDOW";
extendedFuncKeyWindow->setOffset(0,0);
extendedFuncKeyWindow->setZValue(0);
extFuncKeyWinItems->addItem(extendedFuncKeyWindow);
To copy to clipboard, switch view to plain text mode
Bookmarks