Browse Source

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 năm trước cách đây
mục cha
commit
bb4e6f9e51
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);