From bb4e6f9e51d77cb0962a4220e800560885f665dc Mon Sep 17 00:00:00 2001 From: gxalpha Date: Thu, 9 Mar 2023 01:08:24 +0100 Subject: [PATCH] UI: Don't try to make OBSBasic parent of ControlsSplitButton Passing the parent of a QLayout sets it directly as the top-level layout (as per the QLayout docs). This is obviously not what is intended here. Luckily it doesn't even work since the main window of course already has a layout which would need to be explicitly removed before, but it makes Qt yell at us for trying. --- UI/record-button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/record-button.cpp b/UI/record-button.cpp index c368d1d6f..a33bbfdec 100644 --- a/UI/record-button.cpp +++ b/UI/record-button.cpp @@ -67,7 +67,7 @@ static QWidget *getNextWidget(QBoxLayout *container, QLayoutItem *item) ControlsSplitButton::ControlsSplitButton(const QString &text, const QVariant &themeID, void (OBSBasic::*clicked)()) - : QHBoxLayout(OBSBasic::Get()) + : QHBoxLayout() { button.reset(new QPushButton(text)); button->setCheckable(true);