Basilisk-Dev wrote: ↑2026-05-05, 15:05
Drugwash wrote: ↑2026-05-05, 15:00
Would your Qt6 code be available publicly for a test? I'd like to play around with it when I have some time. Unless it requires libraries that my system can't provide such as GLib 2.28+ and the likes, or too new building tools.
https://repo.palemoon.org/Basilisk-Dev/ ... ranch/qt6/
Please note that it is currently extremely buggy and is not suitable for every day use, but it does work from the standpoint that the browser launches and can browse sites.
I did not realize that @Basilisk-Dev's Qt6 port was so far along. I asked a programmer friend to look at a diff file, and he had a few praising comments -
===============================================================
1. this is a real Qt6 backend, not just a superficial build flag experiment. It adds a new widget/qt platform backend, hooks it into the toolkit selection system as cairo-qt6, creates a QGuiApplication, pumps the Qt event loop, creates native QWindow objects, dispatches mouse/keyboard/focus/wheel events into UXP, adds Qt clipboard support, Qt look-and-feel colors, Qt print settings, Qt screen handling, and a gfxQtPlatform
2. The branch appears to do the hard first step: it creates a selectable Qt toolkit target.
The build system adds:
--enable-default-toolkit=cairo-qt6
and maps that to:
MOZ_WIDGET_TOOLKIT = qt
Then old-configure.in checks for:
Qt6Core Qt6Gui Qt6Widgets Qt6PrintSupport
and assigns those flags to TK_CFLAGS / TK_LIBS.
The new backend includes the expected platform pieces:
widget/qt/nsWindow.cpp
widget/qt/mozqwidget.cpp
widget/qt/nsAppShell.cpp
widget/qt/nsClipboard.cpp
widget/qt/nsLookAndFeel.cpp
widget/qt/nsScreenManagerQt.cpp
widget/qt/nsPrintSettingsQt.cpp
gfx/thebes/gfxQtPlatform.cpp
toolkit/xre/nsQAppInstance.cpp
That is the right architecture, still Goanna/XUL using Qt underneath as the native windowing/event/clipboard/platform layer
3. The Qt path does not appear to require libgtk-3-dev as the toolkit backend. It uses Qt6 packages instead.
However, it still intentionally keeps several Linux desktop stack dependencies:
Pango
Fontconfig/Freetype
GLib/GObject
DBus
X11/GLX
XScreenSaver
That is not a problem, as a Linux browser backend can reasonably depend on those without depending on GTK3 itself.
4. What already seems implemented - The following areas are meaningfully present:
- App startup and event loop
nsQAppInstance creates a QGuiApplication, and nsAppShell integrates with Qt’s event dispatcher. That is a core milestone
- Native windows
nsWindow creates MozQWidget, which is actually a QWindow subclass. It handles top-level windows, dialogs, popups, children, visibility, resizing, moving, focus, fullscreen, title, icons, and cursor shape
- Painting path
There is a Qt graphics platform layer, Qt Cairo surface plumbing, and Xlib-backed drawing for X11. It is enough to plausibly render browser content
- Keyboard and mouse input
Mouse buttons, motion, wheel events, keyboard down/press/up, context menu keys, app-command keys, and basic editor keybindings are mapped
- Clipboard
There is a Qt clipboard implementation for text, HTML, images, arbitrary MIME, and X11 selection clipboard when Qt reports support
- Look and feel
Qt palette colors and Qt default font are mapped into the browser’s look-and-feel system
- Printing, partially
PDF/PS print-to-file plumbing exists, using Qt print settings and UXP print targets
5. Reasonable next priorities:
- Make X11 the explicit first target
Do not pretend it is Wayland-ready. Get Qt6/X11 stable first
- Fix screen/HiDPI basics
Screen coordinate swap, actual per-screen scale, actual window screen detection
- Fix clipboard correctness
Especially generic MIME, image lifetime, primary selection behavior
- Add real IME support
This is essential for non-English users
- Add drag-and-drop
File drops, URL drops, internal tab/bookmark/content drag operations
- Clarify printing scope
Either support only print-to-PDF cleanly, or implement real Qt print dialog/native printing [
why not just use the Linux native cups printer dialogue here? -- Andy]
- Decide whether NPAPI/plugin support matters
If it matters, the missing plugin port/XEmbed story is a major item
==================================================
Maybe this work on Basilisk-Qt6 could be the test vehicle for transitioning to a longer-term solution, while leaving Pale Moon alone for the moment since gtk3 is not going anywhere soon?