mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
更换SpkWindow基类为QWidget并修复多个问题
修复mResizable为false时阻止窗口移动的问题 更改About窗口为固定大小
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QFrame>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QCloseEvent>
|
||||
#include "spktitlebar.h"
|
||||
|
||||
class SpkWindow : public QMainWindow
|
||||
class SpkTitleBar;
|
||||
|
||||
class SpkWindow : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -21,7 +21,7 @@ class SpkWindow : public QMainWindow
|
||||
static constexpr int BorderWidth = 7;
|
||||
|
||||
private:
|
||||
QWidget *mCentralWidget, *mUserCentralWidget;
|
||||
QWidget *mUserCentralWidget;
|
||||
QVBoxLayout *mMainVLayout;
|
||||
SpkTitleBar *mTitleBarComponent;
|
||||
int mCornerRadius;
|
||||
@@ -32,7 +32,7 @@ class SpkWindow : public QMainWindow
|
||||
bool mUseCustomEvents;
|
||||
|
||||
public:
|
||||
SpkWindow(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
SpkWindow(QWidget *parent = nullptr);
|
||||
~SpkWindow() override;
|
||||
void SetCentralWidget(QWidget *);
|
||||
bool GetUseTitleBar();
|
||||
@@ -62,4 +62,6 @@ class SpkWindow : public QMainWindow
|
||||
|
||||
private:
|
||||
void PopulateUi();
|
||||
|
||||
void paintWindowBorder();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user