View Full Version : Creating QLabel dynamically of size equal to screen size!!!

6th October 2015, 13:32
Hello Everyone,

I just want to know how can I create a Qlabel dynamically of size equal to the screen size?. I wanted to display a video in that label, but the size should be of screen size.

Thanks in advance


6th October 2015, 17:07
QScreen, QDesktopWidget, and QApplication::desktop() will provide you the information you need to set the QLabel size. If you create the QLabel without a parent, then it will be a top-level widget.

No, I will not give you example code.

6th October 2015, 19:20
you can use QWidget::showFullScreen(). //then to close this we need to use Alt+F4
Alternatively, if you would use QVideoWidget for playing video, this class also has similar functionality for showing full screen.