Details
-
User Story
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.15, 6.2, 6.5, 6.7
-
None
Description
Build the following code:
#include <QApplication> #include <QWidget> #include <QWindow> extern "C" { #include <gdk/gdkx.h> #include <gtk/gtk.h> #include <webkit2/webkit2.h> } int main(int argc, char *argv[]) { QApplication app(argc, argv); gtk_init(nullptr, nullptr); const auto window = gtk_window_new(GTK_WINDOW_TOPLEVEL); const auto webview = webkit_web_view_new(); webkit_web_view_load_uri(WEBKIT_WEB_VIEW(webview), "https://google.com"); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(webview)); gtk_widget_show_all(window); QWidget::createWindowContainer(QWindow::fromWinId(gdk_x11_window_get_xid(gtk_widget_get_window(window))))->show(); return app.exec(); }
With g++ -o main main.cpp -DQT_NO_KEYWORDS $(pkg-config --cflags --libs Qt6Core Qt6Gui Qt6Widgets webkit2gtk-4.0).
If I run it on KDE Neon X11, it works just fine: I see Google. If I run it on Ubuntu (GNOME) 22.04 X11, I see only white or black screen. If I move the cursor, it acts like it recognizes the elements on web page. If I right click, I get context menu from webkit. It just doesn't display the content on screen.
Attachments
Issue Links
- is duplicated by
-
QTBUG-125456 Mouse wheel doesn't work with embedded gtk on XFCE
- Closed
-
QTBUG-125457 Embedded gtk doesn't seem to recognize keyboard focus
- Closed