From 4d94fb69ec108146f711e03b8c34e665a3434e44 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 23 Jul 2014 15:47:50 +0200 Subject: [PATCH] qv4l2: fix layout issues related to stacked widgets I've been digging into why on my laptop the stacked frames in the Input section appear shifted to the right. The reason is that the initial loop in fixWidth() sets the minimumwidth without looking at what the widget is. After some debugging I found out that it was setting the minimumwidth for the wFrameSR widget. So I added checks that it only changes it for comboboxes, spinboxes and sliders. Signed-off-by: Hans Verkuil --- utils/qv4l2/general-tab.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp index 74534d0..d7c4ea4 100644 --- a/utils/qv4l2/general-tab.cpp +++ b/utils/qv4l2/general-tab.cpp @@ -855,6 +855,11 @@ void GeneralTab::fixWidth() QList list = parentWidget()->findChildren(); QList::iterator it; for (it = list.begin(); it != list.end(); ++it) { + if (!qobject_cast(*it) && + !qobject_cast(*it) && + !qobject_cast(*it)) + continue; + if (((*it)->sizeHint().width()) > m_minWidth) { m_increment = (int) ceil(((*it)->sizeHint().width() - m_minWidth) / m_pxw); (*it)->setMinimumWidth(m_minWidth + m_increment * m_pxw); // for stepsize expansion of widgets -- 2.7.4