Files
skygqts/webpreview/shell.qml
T
2026-09-11 14:12:50 -04:00

33 lines
915 B
QML

import QtQuick
import QtWebEngine
import Quickshell
ShellRoot {
// Ensure the WebEngine is initialized
Component.onCompleted: WebEngine.initialize()
PanelWindow {
id: webWindow
width: 800
height: 600
// Background container
Rectangle {
anchors.fill: parent
color: "#1e1e2e" // Match your desktop theme
// The embedded Web Page Component
WebEngineView {
anchors.fill: parent
url: "https://quickshell.org" // The URL you want to embed
// Optional: Handle loading status
onLoadingChanged: (loadingInfo) => {
if (loadingInfo.status === WebEngineView.LoadFailedStatus) {
console.log("Failed to load page: " + loadingInfo.errorString);
}
}
}
}
}
}