PDA

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



jakr13
6th October 2015, 12: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

jakr13

d_stranz
6th October 2015, 16: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.

prasad_N
6th October 2015, 18: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.