Outdated Chromium version due to outdated Qt version

Is there any chance Anki will update to the latest Chromium or Qt versions?

I saw it was noted here that Anki uses what Qt uses for Chromium: Inserting HTML at cursor via `insertHTML` behaves differently depending on system - #2 by dae

I’m having issues with Anki lacking support for some CSS features due to the use of Chromium 112. The latest version of Qt (6.8.1) supports Chromium 127.

Some Anki packages (such as the AUR) appear to have no problems providing Qt 6.8. Qt 6.6 which Anki provides for Windows is out of the standard support window for Qt.

3 Likes

If I understand correctly an update is planned, but dae needs to do more testing:

3 Likes

Would it be rational/possible for Anki to use the system webview rather than bundling its own webview?

This will ensure that the user can always use the latest version of webview, irrespective of the Anki version or the Qt version. In addition, it will also reduce the size of the app.

1 Like

not sure if there’s any pre-existing & maintained library for that?

one move is to write it as a PWA, use service workers for offline reviews and such. would work for mobile devices too, so you no longer need ankidroid&ankimobile, everything is in one codebase. feels like thats a larger project to take on though.

1 Like

Replacing more of the code with web components is definitely a larger project. But, I wasn’t talking about that.

Currently, Anki is using Qt’s bundled webview to render things like the cards in the reviewer, the stats page, the card info page, etc. Can Anki instead use the system’s webview (e.g. Microsoft Edge WebView2 on Windows) to render the same pages?

mollohq/QmlNativeWebView: A lightweight custom WebView component for Qt/QML applications that utilizes the native OS-bundled WebView looks interesting, idk if it’ll carry over to pyqt though.

As it stands, having an embeddable webview is important for the deck overview page (3 webviews in a trenchcoat QVBoxLayout) and the editor (when embedded in the browser) etc.

1 Like

does seem interesting. but also: “No *nix support currently, but contributions are welcome”

a library has to be used for this. it is nonsensical to create and maintain this code on anki’s side.

i did find this though: webviewpy/example/testpyqt.py at new · HIllya51/webviewpy · GitHub
seems to interface with this: GitHub - webview/webview: Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).

also this, but in rust? GitHub - tauri-apps/wry: Cross-platform WebView library in Rust for Tauri.

2 Likes

Today I stumbled on the same issue; Chromium 120+ is required for CSS Nesting.

I tried Release 25.01beta1 · ankitects/anki which includes the aforementioned commit to upgrade Qt to v6.8.1. It seems that Chromium shipped with this version is 122.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.