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.
1.jpg
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;
}
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;
}
To copy to clipboard, switch view to plain text mode
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.
4.jpg
If I use showFullScreen instead then the widget goes fullscreen normally but on clicking again the widget disappears like this:
3.jpg
What can be wrong?
Bookmarks