@@ -127,7 +127,11 @@ void CaptureWin::buildWindow(QWidget *videoSurface)
int l, t, r, b;
m_vboxLayout = new QVBoxLayout(this);
m_vboxLayout->getContentsMargins(&l, &t, &r, &b);
+#if QT_VERSION < 0x060000
m_vboxLayout->setMargin(0);
+#else
+ m_vboxLayout->setContentsMargins(0, 0, 0, 0);
+#endif
m_vboxLayout->addWidget(videoSurface, 1000, Qt::AlignCenter);
setContextMenuPolicy(Qt::CustomContextMenu);
@@ -252,7 +252,11 @@ void ApplicationWindow::addCtrl(QGridLayout *grid, const v4l2_query_ext_ctrl &qe
struct v4l2_querymenu qmenu;
QWidget *wContainer = new QWidget();
QHBoxLayout *m_boxLayout = new QHBoxLayout(wContainer);
+#if QT_VERSION < 0x060000
m_boxLayout->setMargin(0);
+#else
+ m_boxLayout->setContentsMargins(0, 0, 0, 0);
+#endif
__u64 dif;
switch (qec.type) {
@@ -430,8 +430,11 @@ void GeneralTab::inputSection(v4l2_input vin)
QLabel *l = new QLabel("Refresh Tuner Status", parentWidget());
QWidget *w = new QWidget(parentWidget());
QHBoxLayout *box = new QHBoxLayout(w);
-
+#if QT_VERSION < 0x060000
box->setMargin(0);
+#else
+ box->setContentsMargins(0, 0, 0, 0);
+#endif
m_detectSubchans = new QToolButton(w);
m_detectSubchans->setIcon(QIcon(":/enterbutt.png"));
m_subchannels = new QLabel("", w);
Fixes: ../qv4l2/general-tab.cpp:434:22: error: ‘class QHBoxLayout’ has no member named ‘setMargin’ 434 | box->setMargin(0); | ^~~~~~~~~ ../qv4l2/capture-win.cpp:130:23: error: ‘class QVBoxLayout’ has no member named ‘setMargin’ 130 | m_vboxLayout->setMargin(0); | ^~~~~~~~~ ../qv4l2/ctrl-tab.cpp:255:22: error: ‘class QHBoxLayout’ has no member named ‘setMargin’ 255 | m_boxLayout->setMargin(0); | ^~~~~~~~~ Signed-off-by: Peter Seiderer <ps.report@gmx.net> --- utils/qv4l2/capture-win.cpp | 4 ++++ utils/qv4l2/ctrl-tab.cpp | 4 ++++ utils/qv4l2/general-tab.cpp | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-)