wip
This commit is contained in:
@@ -37,30 +37,31 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
// Common init
|
// Common init
|
||||||
QWidget window;
|
QWidget window;
|
||||||
window.setWindowTitle("Webview");
|
window.setWindowTitle("Generic Window");
|
||||||
window.setStyleSheet("background-color: black;");
|
window.setStyleSheet("background-color: black;");
|
||||||
|
window.showFullScreen();
|
||||||
|
|
||||||
// auto windowHandle = window.windowHandle();
|
auto windowHandle = window.windowHandle();
|
||||||
// if (!windowHandle) {
|
if (!windowHandle) {
|
||||||
// fprintf(stderr, "Error: Unable to obtain window handle.\n");
|
fprintf(stderr, "Error: Unable to obtain window handle.\n");
|
||||||
// return 1;
|
return 1;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
||||||
// auto *s = static_cast<wl_surface*>(native->nativeResourceForWindow("surface", windowHandle));
|
auto *s = static_cast<wl_surface*>(native->nativeResourceForWindow("surface", windowHandle));
|
||||||
// if (!s) {
|
if (!s) {
|
||||||
// fprintf(stderr, "Error: Unable to obtain native Wayland surface.\n");
|
fprintf(stderr, "Error: Unable to obtain native Wayland surface.\n");
|
||||||
// return 1;
|
return 1;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
|
wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
|
||||||
// wl_surface_commit(s);
|
wl_surface_commit(s);
|
||||||
|
|
||||||
// window.setFixedSize(2160, 1080);
|
window.setFixedSize(2160, 1080);
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout(&window);
|
QVBoxLayout *layout = new QVBoxLayout(&window);
|
||||||
// layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
// layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
// QString url = args.first();
|
// QString url = args.first();
|
||||||
QWebEngineView *web_view = new QWebEngineView();
|
QWebEngineView *web_view = new QWebEngineView();
|
||||||
|
|||||||
Reference in New Issue
Block a user