diff options
-rw-r--r-- | DOCS/client_api_examples/qtexample.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/DOCS/client_api_examples/qtexample.cpp b/DOCS/client_api_examples/qtexample.cpp index 84b1102055..2740bd9f67 100644 --- a/DOCS/client_api_examples/qtexample.cpp +++ b/DOCS/client_api_examples/qtexample.cpp @@ -96,16 +96,14 @@ void MainWindow::handle_mpv_event(mpv_event *event) mpv_get_property(mpv, "dheight", MPV_FORMAT_INT64, &h) >= 0 && w > 0 && h > 0) { - // Force Qt to resize the mpv window to video size. You probably - // want to do something more sophisticated here, because: - // A) it prevents the user from making the window smaller for no - // reason (I was unsure how to make Qt do the right thing) - // B) the MPV_EVENT_VIDEO_RECONFIG event doesn't necessarily imply - // a resize, and you should check yourself if the video - // dimensions really changed + // Note that the MPV_EVENT_VIDEO_RECONFIG event doesn't necessarily + // imply a resize, and you should check yourself if the video + // dimensions really changed. // mpv itself will scale/letter box the video to the container size // if the video doesn't fit. - mpv_container->setMinimumSize(w, h); + std::stringstream ss; + ss << "Reconfig: " << w << " " << h; + statusBar()->showMessage(QString::fromStdString(ss.str())); } break; } |