mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +00:00
fix:删除qml相关内容
qml放在qrc里面,会导致release模式下,qrc中的qml等资源被归类到sources目录中 这是qt为了编译qrc里面的qml中自动的操作,而且我们没有办法通过宏控制,所以舍弃它
This commit is contained in:
parent
3df69eab95
commit
5b3b87cf7c
5 changed files with 1 additions and 61 deletions
|
@ -9,9 +9,3 @@ HEADERS += \
|
|||
FORMS += \
|
||||
$$PWD/videoform.ui \
|
||||
$$PWD/toolform.ui
|
||||
|
||||
#DEFINES += USE_QTQUICK
|
||||
|
||||
contains(DEFINES, USE_QTQUICK) {
|
||||
QT += quickwidgets
|
||||
}
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QPainter>
|
||||
#ifdef USE_QTQUICK
|
||||
#include <QQuickWidget>
|
||||
#endif
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QMimeData>
|
||||
#include <QFileInfo>
|
||||
|
@ -48,35 +45,6 @@ void VideoForm::initUI()
|
|||
m_widthHeightRatio = 1.0f * phone.width() / phone.height();
|
||||
}
|
||||
|
||||
#ifdef USE_QTQUICK
|
||||
// qml animation
|
||||
QWidget *loadingWidget;
|
||||
QHBoxLayout *horizontalLayout;
|
||||
QQuickWidget *quickWidget;
|
||||
loadingWidget = new QWidget(this);
|
||||
loadingWidget->setObjectName(QStringLiteral("loadingWidget"));
|
||||
loadingWidget->setAutoFillBackground(false);
|
||||
loadingWidget->setStyleSheet(QStringLiteral(""));
|
||||
loadingWidget->setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_loadingWidget = loadingWidget;
|
||||
horizontalLayout = new QHBoxLayout(loadingWidget);
|
||||
horizontalLayout->setSpacing(0);
|
||||
horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
|
||||
horizontalLayout->setContentsMargins(0, 0, 0, 0);
|
||||
quickWidget = new QQuickWidget(loadingWidget);
|
||||
quickWidget->setObjectName(QStringLiteral("quickWidget"));
|
||||
quickWidget->setAutoFillBackground(false);
|
||||
quickWidget->setStyleSheet(QStringLiteral(""));
|
||||
quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
quickWidget->setSource(QUrl(QStringLiteral("qrc:/qml/pinwheel.qml")));
|
||||
// 最后绘制,不设置最后绘制会影响父窗体异形异常(quickWidget的透明通道会形成穿透)
|
||||
quickWidget->setAttribute(Qt::WA_AlwaysStackOnTop);
|
||||
// 背景透明
|
||||
quickWidget->setClearColor(QColor(Qt::transparent));
|
||||
horizontalLayout->addWidget(quickWidget);
|
||||
ui->verticalLayout->addWidget(loadingWidget);
|
||||
#endif
|
||||
|
||||
// mac下去掉标题栏影响showfullscreen
|
||||
#ifndef Q_OS_OSX
|
||||
// 去掉标题栏
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
|
@ -1,20 +0,0 @@
|
|||
import QtQuick 2.5
|
||||
import QtGraphicalEffects 1.0
|
||||
Image {
|
||||
Image {
|
||||
id: wheel
|
||||
anchors.centerIn: parent
|
||||
source: "images/pinwheel.png"
|
||||
|
||||
RotationAnimation {
|
||||
id:rotationAnimation
|
||||
target: wheel
|
||||
to:360
|
||||
direction: RotationAnimation.Clockwise
|
||||
duration: 800
|
||||
loops:Animation.Infinite
|
||||
}
|
||||
|
||||
onStatusChanged: if (wheel.status == Image.Ready) rotationAnimation.start()
|
||||
}
|
||||
}
|
|
@ -2,9 +2,7 @@
|
|||
<qresource prefix="/">
|
||||
<file>font/fontawesome-webfont.ttf</file>
|
||||
<file>image/videoform/phone-h.png</file>
|
||||
<file>image/videoform/phone-v.png</file>
|
||||
<file>qml/pinwheel.qml</file>
|
||||
<file>qml/images/pinwheel.png</file>
|
||||
<file>image/videoform/phone-v.png</file>
|
||||
<file>qss/psblack.css</file>
|
||||
<file>qss/psblack/add_bottom.png</file>
|
||||
<file>qss/psblack/add_left.png</file>
|
||||
|
|
Loading…
Add table
Reference in a new issue