wip
This commit is contained in:
@@ -35,23 +35,23 @@ int main(int argc, char *argv[]) {
|
||||
window.setStyleSheet("background-color: black;");
|
||||
window.showFullScreen();
|
||||
|
||||
auto windowHandle = window.windowHandle();
|
||||
if (!windowHandle) {
|
||||
fprintf(stderr, "Error: Unable to obtain window handle.\n");
|
||||
return 1;
|
||||
}
|
||||
// auto windowHandle = window.windowHandle();
|
||||
// if (!windowHandle) {
|
||||
// fprintf(stderr, "Error: Unable to obtain window handle.\n");
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
||||
auto *s = static_cast<wl_surface*>(native->nativeResourceForWindow("surface", windowHandle));
|
||||
if (!s) {
|
||||
fprintf(stderr, "Error: Unable to obtain native Wayland surface.\n");
|
||||
return 1;
|
||||
}
|
||||
// QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
||||
// auto *s = static_cast<wl_surface*>(native->nativeResourceForWindow("surface", windowHandle));
|
||||
// if (!s) {
|
||||
// fprintf(stderr, "Error: Unable to obtain native Wayland surface.\n");
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
|
||||
wl_surface_commit(s);
|
||||
// wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
|
||||
// wl_surface_commit(s);
|
||||
|
||||
window.setFixedSize(2160, 1080);
|
||||
// window.setFixedSize(2160, 1080);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(&window);
|
||||
layout->setSpacing(0);
|
||||
@@ -59,7 +59,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// QString url = args.first();
|
||||
QWebEngineView *web_view = new QWebEngineView();
|
||||
web_view->load(QUrl("http://www.fark.com/"));
|
||||
web_view->load(QUrl(argv[1])));
|
||||
layout->addWidget(web_view);
|
||||
|
||||
return app.exec();
|
||||
|
||||
Reference in New Issue
Block a user