mirror of
https://github.com/jaredtao/TaoQuick.git
synced 2025-01-19 20:22:56 +08:00
34 lines
657 B
C++
34 lines
657 B
C++
#pragma once
|
||
|
||
#include <QQuickView>
|
||
//无边框窗口,支持拖动和改变大小,支持Windows平台Aero效果
|
||
class TaoView : public QQuickView
|
||
{
|
||
Q_OBJECT
|
||
using Super = QQuickView;
|
||
Q_PROPERTY(bool isMax READ isMax NOTIFY isMaxChanged)
|
||
public:
|
||
explicit TaoView(QWindow *parent = nullptr);
|
||
~TaoView();
|
||
void moveToScreenCenter();
|
||
bool isMax() const
|
||
{
|
||
return m_isMax;
|
||
}
|
||
|
||
public slots:
|
||
void setIsMax(bool isMax);
|
||
|
||
signals:
|
||
void isMaxChanged(bool isMax);
|
||
|
||
protected:
|
||
|
||
#if WIN32
|
||
bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
|
||
#endif
|
||
private:
|
||
bool m_isMax;
|
||
};
|
||
|