Skip to content

Add GTK and Qt backends - #6

Merged
freakboy3742 merged 12 commits into
beeware:mainfrom
kattni:gtk-qt-backends
Oct 12, 2026
Merged

freakboy3742 merged 12 commits into
beeware:mainfrom
kattni:gtk-qt-backends

Conversation

@kattni

@kattni kattni commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Adds GTK 3 and Qt backends for CodeEditor, bringing the widget to Linux.

  • GTK: Gtk.TextTags for highlights; the gutter is drawn into the text view's left border window. GTK 3 only, since Toga 0.5.7 has no working GTK 4 multiline input.
  • Qt: a QPlainTextEdit with a QSyntaxHighlighter for the spans and a child widget for the gutter.
  • Entry points for toga_gtk and toga_qt; both modules join the coverage omit list. No new dependencies.
  • The example app gains a Linux Briefcase table; the README documents the Linux packages and the Qt recipe (TOGA_BACKEND=toga_qt, since both backends register as linux).

Both backends were checked on Ubuntu 26.04 with real keyboard and mouse input: highlighting of each sample, typing, a trailing newline, emoji offsets, wrapped lines, gutter width and toggling, and scrolling.

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Assisted-by: Claude Fable 5.1 (Claude Code)

kattni added a commit to kattni/toga-code-editor that referenced this pull request Oct 12, 2026

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made some tweaks to how the example editor is launched, so that Qt is easier to test - there's probably some more we can do to explicitly list the system dependencies, but for now, this is good enough. Thanks!

@freakboy3742
freakboy3742 merged commit 53cadbd into beeware:main Oct 12, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants