mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
f049d04af4
Attempting to set the window title of a BrowserDock that is closed, then opening the BrowserDock, would show that BrowserDock with an incorrect title. We can handle this by overriding the showEvent of BrowserDock and manually setting the window title after the showEvent is called, hopefully ensuring that we are only setting the window title on a window that exists.
18 lines
358 B
C++
18 lines
358 B
C++
#pragma once
|
|
|
|
#include <QDockWidget>
|
|
|
|
class OBSDock : public QDockWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
inline OBSDock(QWidget *parent = nullptr) : QDockWidget(parent) {}
|
|
inline OBSDock(const QString &title, QWidget *parent = nullptr)
|
|
: QDockWidget(title, parent)
|
|
{
|
|
}
|
|
|
|
virtual void closeEvent(QCloseEvent *event);
|
|
virtual void showEvent(QShowEvent *event);
|
|
};
|