-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.6.0, 5.9.3, 6.5, 6.6
-
None
-
Windows 8.0
Application output shows error messages on show/hide the dialog:
UpdateLayeredWindowIndirect failed for ptDst=(749, 373), size=(82x35), dirty=(92x45 -5, -5) (incorrect parameter)
Dialog has FramelessWindowHint, WA_TranslucentBackground attributes and use QGraphicsDropShadowEffect.
Example to reproduce the bug:
#include <QtWidgets>
#include <QApplication>
class Dialog : public QDialog{
public:
Dialog( QWidget * parent = 0, Qt::WindowFlags f = Qt::FramelessWindowHint | Qt::Window )
: QDialog( parent, f)
{
setAttribute(Qt::WA_TranslucentBackground, true);
auto *layout = new QHBoxLayout(this);
auto *label = new QLabel("This is dialog", this);
layout->addWidget(label);
auto *bodyShadow = new QGraphicsDropShadowEffect(this);
bodyShadow->setBlurRadius(5);
bodyShadow->setOffset(QPointF(0,0));
setGraphicsEffect(bodyShadow);
}
};
int main(int argc, char** argv)
{
QApplication a(argc, argv);
Dialog dialog;
return dialog.exec();
}