diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-01-20 05:51:10 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-01 22:47:07 +0100 |
commit | 58f2a78fa1563f8b05b4895809a99cb3208e30e6 (patch) | |
tree | 254a4f4082f49de969677be6f8d05c845a169c96 | |
parent | 4704f0f2ecd68fd0ec71f6a08f5a76d173ee43c7 (diff) |
video/widget: fix size not set
-rw-r--r-- | video/video-widget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/video/video-widget.cpp b/video/video-widget.cpp index c72221b0..3018a3c4 100644 --- a/video/video-widget.cpp +++ b/video/video-widget.cpp @@ -17,6 +17,10 @@ void video_widget::init_image_nolock() video_widget::video_widget(QWidget* parent) : QWidget(parent) { + if (parent) + setFixedSize(parent->size()); + else + setFixedSize(320, 240); init_image_nolock(); connect(&timer, &QTimer::timeout, this, &video_widget::draw_image, Qt::DirectConnection); timer.start(15); @@ -84,4 +88,3 @@ void video_widget::set_fresh(bool x) { fresh_.store(x, std::memory_order_release); } - |