Hmm... how exactly did you try setting the framebuffer into ARGB1555 in Qt? As far as I can see such format is not supported by Qt.
hi,wysota,thanks for your help.I can not set the framebuffer into ARGB1555 in Qt.Such format is not supported by Qt,really?
but I find the format in qscreenlinuxfb_qws.cpp.
void QLinuxFbScreen::setPixelFormat(struct fb_var_screeninfo info)
{
const fb_bitfield rgba[4] = { info.red, info.green,
info.blue, info.transp };
QImage::Format format = QImage::Format_Invalid;
switch (d) {
case 15: {
const fb_bitfield rgb1555[4] = {{10, 5, 0}, {5, 5, 0},
{0, 5, 0}, {15, 1, 0}};
const fb_bitfield bgr1555[4] = {{0, 5, 0}, {5, 5, 0},
{10, 5, 0}, {15, 1, 0}};
if (memcmp(rgba, rgb1555, 3 * sizeof(fb_bitfield)) == 0) {
format = QImage::Format_RGB555;
} else if (memcmp(rgba, bgr1555, 3 * sizeof(fb_bitfield)) == 0) {
format = QImage::Format_RGB555;
pixeltype = QScreen::BGRPixel;
}
break;
}
QScreen::setPixelFormat(format);
}
we can see,Qt treats ARGB1555 as Format_RGB555.
And apparently it tries to set that as the framebuffer format, giving you 15 bits which is not supported by your hardware. It looks like either a bug in Qt, your code or in the driver.
Bookmarks