PDA

View Full Version : SetParent(0) : SetMaximized() vs SetFullScreen()



antweb
20th April 2015, 12:26
I am making using VlcWidgetVideo, a widget provided in the Vlc-Qt llibrary to view the feed of a RTSP Camera.
It normally llooks like this.
11105

I have implemented mouse click on the widget in the following way:


if (maxMode== false)
{
m_enOrigWindowFlags = this->windowFlags();
m_pSize = this->size();
this->setParent(0);
this->setAspectRatio(Vlc::R_16_9);
this->showMaximized();
maxMode = true;
}
else
{
this->setParent(m_pParent);
this ->resize(m_pSize);
this->setAspectRatio(Vlc::Original);
this->overrideWindowFlags(m_enOrigWindowFlags);
this->move(280,10);
this->show();
maxMode = false;
}


Now when I click on the widget because it is showMaximized it shows like this with some space left in the side. On clicking back it comes to the original way as shown in Image 1.
11106

If I use showFullScreen instead then the widget goes fullscreen normally but on clicking again the widget disappears like this:
11107

What can be wrong?

antweb
30th April 2015, 09:30
Can anybody help on this topic?