mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-21 03:55:04 +00:00
动画背景待处理
This commit is contained in:
parent
fe824508ad
commit
7b6a7dfcfc
2 changed files with 86 additions and 12 deletions
|
@ -31,7 +31,7 @@ VideoForm::VideoForm(const QString& serial, QWidget *parent) :
|
|||
// 去掉标题栏
|
||||
setWindowFlags(Qt::FramelessWindowHint);
|
||||
// 根据图片构造异形窗口
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
|
||||
setMouseTracking(true);
|
||||
ui->videoWidget->setMouseTracking(true);
|
||||
|
@ -118,18 +118,30 @@ VideoForm::VideoForm(const QString& serial, QWidget *parent) :
|
|||
bool vertical = size().height() > size().width();
|
||||
updateStyleSheet(vertical);
|
||||
|
||||
ui->videoWidget->hide();
|
||||
//ui->loadingWidget->setAutoFillBackground(true);
|
||||
//ui->quickWidget->setClearColor(QColor(Qt::transparent));
|
||||
|
||||
//ui->quickWidget->setSource(QUrl(QString::fromUtf8("qrc:/qml/pinwheel.qml")));
|
||||
//ui->quickWidget->show();
|
||||
/*
|
||||
ui->videoWidget->hide();
|
||||
// qquickwidget
|
||||
QQuickWidget* pinwheel = new QQuickWidget(this);
|
||||
pinwheel->setObjectName(QString::fromUtf8("pinwheel"));
|
||||
pinwheel->setAutoFillBackground(false);
|
||||
pinwheel->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
pinwheel->setSource(QUrl(QString::fromUtf8("qrc:/qml/pinwheel.qml")));
|
||||
pinwheel->setClearColor(QColor(Qt::transparent));
|
||||
pinwheel->setGeometry(ui->videoWidget->geometry());
|
||||
pinwheel->show();
|
||||
QWidget* test = new QWidget(this);
|
||||
test->setGeometry(QRect(0, 200, 170, 370));
|
||||
test->setAutoFillBackground(false);
|
||||
test->show();
|
||||
// qquickwidget
|
||||
QQuickWidget* pinwheel = new QQuickWidget(this);
|
||||
pinwheel->setObjectName(QString::fromUtf8("pinwheel"));
|
||||
pinwheel->setAutoFillBackground(false);
|
||||
pinwheel->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
pinwheel->setSource(QUrl(QString::fromUtf8("qrc:/qml/pinwheel.qml")));
|
||||
pinwheel->setClearColor(QColor(Qt::transparent));
|
||||
pinwheel->setGeometry(QRect(0, 0, 170, 170));
|
||||
//pinwheel->setGeometry(ui->videoWidget->geometry());
|
||||
pinwheel->setAutoFillBackground(true);
|
||||
pinwheel->show();
|
||||
*/
|
||||
|
||||
ToolForm* mw = new ToolForm(this, ToolForm::AP_OUTSIDE_RIGHT);
|
||||
mw->move(pos().x() + geometry().width(), pos().y() + 30);
|
||||
mw->show();
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
border-width: 150px 142px 85px 142px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -35,12 +35,74 @@
|
|||
<property name="bottomMargin">
|
||||
<number>62</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="loadingWidget" native="true">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(0, 0, 0);</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="QQuickWidget" name="quickWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>170</width>
|
||||
<height>170</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>170</width>
|
||||
<height>170</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(0, 0, 0);</string>
|
||||
</property>
|
||||
<property name="resizeMode">
|
||||
<enum>QQuickWidget::SizeRootObjectToView</enum>
|
||||
</property>
|
||||
<property name="source">
|
||||
<url>
|
||||
<string>file:///G:/mygitcode/QtScrcpy/QtScrcpy/qml/pinwheel.qml</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QYUVOpenGLWidget" name="videoWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QQuickWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>QtQuickWidgets/QQuickWidget</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QYUVOpenGLWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
|
|
Loading…
Add table
Reference in a new issue