chore: no longer based on QMainWindow

Since most of the features that QMainWindow offered will never be
used in this program. We don't need a statusbar, a menubar, etc.
This commit is contained in:
Gary Wang
2020-12-29 23:28:17 +08:00
parent dc17e1d0b1
commit 3abc16d3ff
5 changed files with 66 additions and 17 deletions

25
app/framelesswindow.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef FRAMELESSWINDOW_H
#define FRAMELESSWINDOW_H
#include <QWidget>
QT_BEGIN_NAMESPACE
class QVBoxLayout;
QT_END_NAMESPACE
class FramelessWindow : public QWidget
{
Q_OBJECT
public:
explicit FramelessWindow(QWidget *parent = nullptr);
void setCentralWidget(QWidget * widget);
signals:
private:
QVBoxLayout * m_centralLayout = nullptr;
QWidget * m_centralWidget = nullptr; // just a pointer, doesn't take the ownership.
};
#endif // FRAMELESSWINDOW_H