From eb9a51b0b4a63e82886a336981d24cec308f2ef5 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Mon, 12 Aug 2013 19:46:30 -0700 Subject: [PATCH] Enforce a minimum window size in Show to avoid warnings in windows --- openbr/plugins/gui.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/gui.cpp b/openbr/plugins/gui.cpp index d48797b..483a03e 100644 --- a/openbr/plugins/gui.cpp +++ b/openbr/plugins/gui.cpp @@ -70,6 +70,7 @@ public: DisplayWindow(QWidget * parent = NULL) : QLabel(parent) { + setFixedSize(200,200); QApplication::instance()->installEventFilter(this); } @@ -80,7 +81,13 @@ public slots: show(); setPixmap(pixmap); - setFixedSize(input.size()); + + // We appear to get a warning on windows if we set window width < 104. This is of course not + // reflected in the Qt min size settings, and I don't know how to query it. + QSize temp = input.size(); + if (temp.width() < 104) + temp.setWidth(104); + setFixedSize(temp); } -- libgit2 0.21.4