瀏覽代碼

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.
gxalpha 2 年之前
父節點
當前提交
bb4e6f9e51
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      UI/record-button.cpp

+ 1 - 1
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);