Planned maintenance: From Sunday 8th December 10:00 CET there will be changes to try and solve the caching issues that have been experienced. If anyone has a problem connecting after this period then please PM @AndyS or any of the moderators.

Resizing Qwidget with app window



  • Hi,
    I am using Qwidget to play video streams.
    I am looking of a way to synchronize the Qwidget window with the app window, meaning when I minimize the app window or maximize it, the Qwidget's resolution will grow small or big with the app(same as happens with youtube windows for example).
    I've searched and couldn't find a solution for this.
    Thanks.



  • I am not sure what you are referring to as you app window, but provided that it too is a QWidget you can use QWidget::changeEvent(QEvent* event). In there you can check the event to figure out whether the widget got minimized, maximized or just resized.
    From there you can just pass the information to you video player widget and handle it appropriately.

    Hope that helps.