mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-06 19:12:30 +01:00
Add refresh ability of widgets via F5
This commit is contained in:
parent
789abb1535
commit
4c4f5356e9
@ -23,6 +23,21 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
shortcut: "F5"
|
||||
onTriggered: {
|
||||
loader.sourceComponent = undefined
|
||||
loader.source = ""
|
||||
Widget.clearComponentCache()
|
||||
if (Widget.type === "qmlWidget") {
|
||||
loader.source = Qt.resolvedUrl(Widget.sourcePath)
|
||||
} else if (Widget.type === "htmlWidget") {
|
||||
loader.sourceComponent = webViewComponent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OpacityAnimator {
|
||||
id: animFadeOut
|
||||
from: 1
|
||||
|
@ -90,6 +90,11 @@ void WidgetWindow::setWidgetSize(const int with, const int height)
|
||||
m_window.setHeight(height);
|
||||
}
|
||||
|
||||
void WidgetWindow::clearComponentCache()
|
||||
{
|
||||
m_window.engine()->clearComponentCache();
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
void WidgetWindow::setWindowBlur(unsigned int style)
|
||||
{
|
||||
|
@ -68,6 +68,7 @@ public slots:
|
||||
void setPos(int xPos, int yPos);
|
||||
void setClickPos(const QPoint& clickPos);
|
||||
void setWidgetSize(const int with, const int height);
|
||||
void clearComponentCache();
|
||||
|
||||
void setAppID(QString appID)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user