summaryrefslogtreecommitdiffstats
path: root/demos/multimedia
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2010-03-30 00:42:43 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2010-03-30 00:45:28 (GMT)
commit3546fcbd83b2a255894e6ad9aa673f6feaba6fe7 (patch)
tree90b5799bf329f3c608d909f11168e9ddedccf025 /demos/multimedia
parente19d9a53afa0a50d0ca85a144add9d546aac5b39 (diff)
downloadQt-3546fcbd83b2a255894e6ad9aa673f6feaba6fe7.zip
Qt-3546fcbd83b2a255894e6ad9aa673f6feaba6fe7.tar.gz
Qt-3546fcbd83b2a255894e6ad9aa673f6feaba6fe7.tar.bz2
Don't fill the video widget borders or background by default.
Can be enabled by settings setAutoFillBackground or the Qt::WA_OpaquePaintEvent to true. Reviewed-by: Dmytro Poplavskiy
Diffstat (limited to 'demos/multimedia')
-rw-r--r--demos/multimedia/player/videowidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/demos/multimedia/player/videowidget.cpp b/demos/multimedia/player/videowidget.cpp
index 3bf36c3..be864ec 100644
--- a/demos/multimedia/player/videowidget.cpp
+++ b/demos/multimedia/player/videowidget.cpp
@@ -47,6 +47,12 @@ VideoWidget::VideoWidget(QWidget *parent)
: QVideoWidget(parent)
{
setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
+
+ QPalette p = palette();
+ p.setColor(QPalette::Window, Qt::black);
+ setPalette(p);
+
+ setAttribute(Qt::WA_OpaquePaintEvent);
}
void VideoWidget::keyPressEvent(QKeyEvent *event)