DisplayType *displayForm, QSize resolution, qreal scaleFactor) :
QLabel(parent), DisplayBase(displayForm, resolution, scaleFactor, this)
{
- /* fill the screen with black surface */
+ /* fill the screen with black(with full alpha) surface */
QPixmap initImage(
displayForm->getRect().width() * scaleFactor,
displayForm->getRect().height() * scaleFactor);
- initImage.fill(Qt::black);
+ initImage.fill(QColor(0, 0, 0, 255));
setPixmap(initImage);
/* to be enable to drop events */
setAcceptDrops(true);
void qt5_update_internal(void *data, int width, int height)
{
- QImage image((uchar *)data, width, height, QImage::Format_RGB32);
+ QImage image((uchar *)data, width, height, QImage::Format_ARGB32);
- mainwindow->getScreenWidget()->setPixmap(
- QPixmap::fromImage(image.transformed(
+ mainwindow->getScreenWidget()->setPixmap(QPixmap::fromImage(
+ image.convertToFormat(QImage::Format_RGB32).transformed(
mainwindow->getDisplayMatrix(), Qt::SmoothTransformation)));
}