Results 1 to 2 of 2

Thread: SetParent(0) : SetMaximized() vs SetFullScreen()

  1. #1
    Join Date
    Jul 2014
    Posts
    46
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default SetParent(0) : SetMaximized() vs SetFullScreen()

    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:
    Qt Code:
    1. if (maxMode== false)
    2. {
    3. m_enOrigWindowFlags = this->windowFlags();
    4. m_pSize = this->size();
    5. this->setParent(0);
    6. this->setAspectRatio(Vlc::R_16_9);
    7. this->showMaximized();
    8. maxMode = true;
    9. }
    10. else
    11. {
    12. this->setParent(m_pParent);
    13. this ->resize(m_pSize);
    14. this->setAspectRatio(Vlc::Original);
    15. this->overrideWindowFlags(m_enOrigWindowFlags);
    16. this->move(280,10);
    17. this->show();
    18. maxMode = false;
    19. }
    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?
    Last edited by antweb; 20th April 2015 at 12:37.

  2. #2
    Join Date
    Jul 2014
    Posts
    46
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: SetParent(0) : SetMaximized() vs SetFullScreen()

    Can anybody help on this topic?

Similar Threads

  1. Cant use QWidget::setParent().
    By vitaR in forum Newbie
    Replies: 2
    Last Post: 2nd July 2014, 01:48
  2. QObject::setParent across threads.
    By psih128 in forum Qt Programming
    Replies: 4
    Last Post: 21st January 2014, 16:01
  3. hwnd to qwidget setparent error
    By cic in forum Qwt
    Replies: 1
    Last Post: 27th August 2013, 14:40
  4. Qt Necessitas - setFullScreen ?
    By leviribeiro in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 2nd November 2011, 22:56
  5. Qt widget setParent
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 30th November 2007, 20:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.