Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
1ff717e
Testbed and core changes to support Qt backend operations
johnzhou721 Sep 18, 2025
4d440ca
Addition of a Qt backend source (untested curretnly)
johnzhou721 Sep 18, 2025
2b96810
get rid of unofficial hacks and integrate into core
johnzhou721 Sep 18, 2025
b7504bc
a missed bug
johnzhou721 Sep 18, 2025
49312d0
no-cover trivial parts
johnzhou721 Sep 18, 2025
5f64d70
remove swapfile
johnzhou721 Sep 18, 2025
86e5731
workaround Briefcase's lack of packaging
johnzhou721 Sep 18, 2025
69a660d
fixup pyside6 imoprt hack
johnzhou721 Sep 19, 2025
3028865
fixup to get ready for testbed
johnzhou721 Sep 19, 2025
39349ec
Update button.py
johnzhou721 Sep 19, 2025
d2d0886
Update button.py
johnzhou721 Sep 19, 2025
9236d50
rerun ios ci
johnzhou721 Sep 19, 2025
9255280
Update core/src/toga/__init__.pyi
johnzhou721 Sep 23, 2025
d712512
Cosmetic cleanups
johnzhou721 Sep 26, 2025
7bbecbf
Update qt/src/toga_qt/libs/testing.py
johnzhou721 Sep 26, 2025
027b404
Update qt/src/toga_qt/widgets/activityindicator.py
johnzhou721 Sep 26, 2025
4a0695b
Update qt/src/toga_qt/libs/testing.py
johnzhou721 Sep 26, 2025
f709818
Update qt/src/toga_qt/widgets/activityindicator.py
johnzhou721 Sep 26, 2025
03a21f7
Update qt/src/toga_qt/screens.py
johnzhou721 Sep 26, 2025
e8f15a3
Formatting fixes
johnzhou721 Sep 26, 2025
81a964e
Remove nativeicon, hack action instead
johnzhou721 Sep 26, 2025
bece50b
Platform changes
johnzhou721 Sep 26, 2025
5760f1f
implement colors, a small window fixup
johnzhou721 Sep 28, 2025
7b11df2
multi-app structure setup
johnzhou721 Sep 28, 2025
f1cf4b3
correct the config
johnzhou721 Sep 28, 2025
5ee1ce6
qt testbed working
johnzhou721 Sep 28, 2025
12a9859
fixup
johnzhou721 Sep 28, 2025
220a786
increase timeouts
johnzhou721 Sep 28, 2025
84eb389
restore gtk test
johnzhou721 Sep 28, 2025
8387ade
continued progress.
johnzhou721 Oct 2, 2025
f274bce
a bunch of fixups
johnzhou721 Oct 5, 2025
c906be6
coverage fix
johnzhou721 Oct 5, 2025
7e8ff2e
a missing skip
johnzhou721 Oct 5, 2025
a693640
Update .github/workflows/ci.yml
johnzhou721 Oct 5, 2025
9d12cd3
Update .github/workflows/ci.yml
johnzhou721 Oct 5, 2025
535375c
[desparately] github snow day...
johnzhou721 Oct 5, 2025
9606935
Use system_pysie6
johnzhou721 Oct 5, 2025
389728a
Convert changenote to Markdown
johnzhou721 Oct 9, 2025
f5bf414
Update testbed/src/testbed/__main__.py
johnzhou721 Oct 9, 2025
49061fc
Update qt/src/toga_qt/window.py
johnzhou721 Oct 9, 2025
2a09c54
Update qt/src/toga_qt/app.py
johnzhou721 Oct 10, 2025
451f0d3
Update qt/src/toga_qt/app.py
johnzhou721 Oct 10, 2025
343e19b
Merge branch 'main' into qtbackend
johnzhou721 Oct 10, 2025
e3a90a7
audit commands [UNTESTED
johnzhou721 Oct 10, 2025
5212a2f
determine version from trav
johnzhou721 Oct 11, 2025
943680e
Force large icon size on Qt
johnzhou721 Oct 11, 2025
ffa53af
fix a glut of issues
johnzhou721 Oct 11, 2025
4c70a66
Affix more icons, fixup
johnzhou721 Oct 11, 2025
2efb453
icons removal
johnzhou721 Oct 11, 2025
942a5fe
move editoperation
johnzhou721 Oct 11, 2025
1bb3a13
working beep remove nativeicon
johnzhou721 Oct 11, 2025
0066ac5
fixup test
johnzhou721 Oct 11, 2025
806dcf0
fixup
johnzhou721 Oct 11, 2025
324a3d1
icon assert probe
johnzhou721 Oct 11, 2025
bae3759
increase cov
johnzhou721 Oct 11, 2025
c7e2f4c
More approxes
johnzhou721 Oct 11, 2025
d50a967
a testing adjustment, 100% cover on Wayland
johnzhou721 Oct 11, 2025
72f52fa
complete coverage
johnzhou721 Oct 11, 2025
c8b5146
setup CI
johnzhou721 Oct 11, 2025
3aaec9e
itypo
johnzhou721 Oct 11, 2025
09e6988
install in global directory using sudo to bypass user install
johnzhou721 Oct 11, 2025
290c3d9
Update ci.yml
johnzhou721 Oct 11, 2025
a38a906
Update ci.yml
johnzhou721 Oct 12, 2025
74e3c64
Update ci.yml
johnzhou721 Oct 12, 2025
5a0b9af
Update ci.yml
johnzhou721 Oct 12, 2025
453078d
Delete demo/toga_demo/resources/New Folder/brutus.icns
johnzhou721 Oct 12, 2025
d6615cf
Delete demo/toga_demo/resources/New Folder/brutus.ico
johnzhou721 Oct 12, 2025
ade178d
missing no-branches
johnzhou721 Oct 12, 2025
e9c0552
replace with constant
johnzhou721 Oct 12, 2025
846b35a
fix comment, use python native stuff
johnzhou721 Oct 12, 2025
c027942
Apply suggestion from @johnzhou721
johnzhou721 Oct 12, 2025
05bd2d6
shift system-pyside6 to testbed
johnzhou721 Oct 12, 2025
716494b
Apply suggestion from @johnzhou721
johnzhou721 Oct 12, 2025
88ff0fe
significant speedup
johnzhou721 Oct 12, 2025
5f4177d
rework redraw
johnzhou721 Oct 12, 2025
224d19a
Convert to md
johnzhou721 Oct 13, 2025
439eab4
Merge branch 'main' into qtbackend
johnzhou721 Oct 13, 2025
38fa38a
comply with new pre-commit
johnzhou721 Oct 13, 2025
8040b28
Update ci.yml
johnzhou721 Oct 13, 2025
33c66c8
Update ci.yml
johnzhou721 Oct 13, 2025
9dcbdcb
Update ci.yml
johnzhou721 Oct 13, 2025
1579d90
Use official deps list
johnzhou721 Oct 13, 2025
ab4ca2f
use official dependency lists for Ubuntu
johnzhou721 Oct 15, 2025
3cf608a
[wip] fixups, docs
johnzhou721 Oct 13, 2025
5f889fb
add avail, rework deps, fix misc doc bugs btw
johnzhou721 Oct 15, 2025
3bd9645
Update window.py
johnzhou721 Oct 15, 2025
3e6a461
Update probe.py
johnzhou721 Oct 15, 2025
3bb4f0d
Merge remote-tracking branch 'upstream/main' into qtbackend
johnzhou721 Oct 15, 2025
a37ef32
Spelling checks
johnzhou721 Oct 15, 2025
49b6598
pin version
johnzhou721 Oct 15, 2025
573ef5e
RERUN CI
johnzhou721 Oct 15, 2025
429d818
remove native icon support
johnzhou721 Oct 15, 2025
0de1bc1
Requested changes.
johnzhou721 Oct 15, 2025
0712512
Suggested changes, update docs.
johnzhou721 Oct 15, 2025
e59530e
Spellcheck
johnzhou721 Oct 15, 2025
b7d5ccb
use Linux (backend) in tabs
johnzhou721 Oct 16, 2025
f5df707
No weird escapes
johnzhou721 Oct 16, 2025
6da8ca1
CI fixes
johnzhou721 Oct 16, 2025
81c793e
use getattr
johnzhou721 Oct 16, 2025
8b5d470
docstring cosmetics
johnzhou721 Oct 16, 2025
06be9dd
use __bool__ for env, handle windows in a different way
johnzhou721 Oct 16, 2025
cb46709
Wayland to 100% coverage
johnzhou721 Oct 16, 2025
dcf4f9f
Requested changes.
johnzhou721 Oct 16, 2025
f8b19ff
async beep function
johnzhou721 Oct 16, 2025
1b9c100
Add redraw delay
johnzhou721 Oct 16, 2025
58e7284
exclude nav
johnzhou721 Oct 16, 2025
4d7300e
Integrate canberra properly, small command cleanup
johnzhou721 Oct 16, 2025
f9224f5
Remove unused helper
johnzhou721 Oct 16, 2025
0aac40a
Enhance Linux documentation for GTK and Qt prerequisites
johnzhou721 Oct 17, 2025
83f08b3
Adjust delay in app beep test to 2 seconds
johnzhou721 Oct 17, 2025
2e2b7ea
Rerun CI
johnzhou721 Oct 17, 2025
b40b174
Fix image path for Android ActivityIndicator
johnzhou721 Oct 17, 2025
a894e27
Update preferences group description in command.py
johnzhou721 Oct 18, 2025
389852e
Remove duplicate FIXME comment in get_name method
johnzhou721 Oct 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ updates:
day: "sunday"
time: "20:00"

- package-ecosystem: "pip"
directory: "/qt"
schedule:
# Check for updates on Sunday, 8PM UTC
interval: "weekly"
day: "sunday"
time: "20:00"

- package-ecosystem: "pip"
directory: "/testbed"
ignore:
Expand Down
92 changes: 88 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
- "demo"
- "dummy"
- "gtk"
- "qt"
- "iOS"
- "toga"
- "positron"
Expand Down Expand Up @@ -208,7 +209,7 @@ jobs:
tox -e trav-compat

testbed:
name: Testbed
name: Testbed (${{ matrix.backend }})
needs: [ package, core-and-travertino ]
runs-on: ${{ matrix.runs-on }}
strategy:
Expand All @@ -231,6 +232,7 @@ jobs:
briefcase-run-prefix: ""
briefcase-run-args: ""
setup-python: true
testbed-app: "testbed"

- backend: "macOS-x86_64"
platform: "macOS"
Expand Down Expand Up @@ -277,7 +279,7 @@ jobs:
- backend: "linux-wayland-gtk3"
platform: "linux"
runs-on: "ubuntu-24.04"
# The package list should be the same as in unix-prerequisites.rst, and the BeeWare
# The package list should be the same as in unix-prerequisites.md, and the BeeWare
# tutorial, plus mutter to provide a window manager.
pre-command: |
sudo apt update -y
Expand Down Expand Up @@ -306,7 +308,7 @@ jobs:
runs-on: "ubuntu-24.04"
env:
XDG_RUNTIME_DIR: "/tmp"
# The package list should be build on the same base as unix-prerequisites.rst,
# The package list should be build on the same base as unix-prerequisites.md,
# and the BeeWare tutorial. Additional packages will be added for window
# management, and features such as web views and geolocation that aren't part
# of the default/tutorial environment.
Expand All @@ -333,6 +335,87 @@ jobs:
setup-python: false # Use the system Python packages
app-user-data-path: "$HOME/.local/share/testbed"

- backend: "linux-x11-qt"
platform: "linux"
runs-on: "ubuntu-24.04"
testbed-app: "testbed-qt"
# The package list should be dependencies listed in unix-prerequsites.md, plus we need a window
# manager that is reasonably lightweight, honors full screen mode, and
# treats the window position as the top-left corner of the *window*, not the
# top-left corner of the window *content*. The default GNOME window managers of
# most distros meet these requirements, but they're heavyweight; flwm doesn't
# work either. Blackbox is the lightest WM we've found that works.
# PySide6 must be installed in VM to test that system-pyside6 works properly.
pre-command: |
sudo apt update -y
sudo apt install -y --no-install-recommends \
blackbox python3-dev xvfb \
gnome-session-canberra build-essential \
libfontconfig1-dev libfreetype-dev libgtk-3-dev \
libx11-dev libx11-xcb-dev libxext-dev \
libxfixes-dev libxi-dev libxkbcommon-dev \
libxkbcommon-x11-dev libxrender-dev 'libxcb*-dev' \
libwayland-dev libwayland-egl1-mesa libwayland-server0 \
libgles2-mesa-dev libxkbcommon-dev
Comment on lines +351 to +359
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised so many GTK/Gnome libraries are required here. Are you sure this is a minimal set?

Copy link
Contributor Author

@johnzhou721 johnzhou721 Oct 16, 2025

Choose a reason for hiding this comment

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

See https://doc.qt.io/qt-6/linux-requirements.html -- this is the list.

gnome-session-canberra is used for App.beep -- QApplication::beep does not work if pcspkr which is a very bad-noised module is enabled, and the proper way to do it in KDE is through KNotifications -- but then we'd have to bundle a .knotifyrc file which we currently does not support in Briefcase AFAICT, and that needs a meaningful event name. So we just use libcanberra here (canberra-gtk-play command line actaully) to play the freedesktop.org sound theme.

EDIT -- would it perhaps be more preferrable to use something like https://pypi.org/project/py-canberra/ for sounding the bell rather than calling it through the command line?

Wonder why it's called Canberra though... sounds weirdly nice.

Copy link
Contributor Author

@johnzhou721 johnzhou721 Oct 16, 2025

Choose a reason for hiding this comment

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

For the App.beep thing, the problem seems to be that QApplication.beep isn't implemented at all on Wayland... also KNotifications upon further research seems to be that each app can declare notification types and in System Settings you can tweak what sort of action you want these notifications to make... that leaves libcanberra being the only way we could possibly play a bell sound.

Integrating libcanberra from the python side is nontrivial... the way to play a sound from the correct theme seems to be using its gtk integration, which requires a gtk event loop, but we already run a Qt event loop in our applications. Else we can hardcode a sound theme, but I think the goal of Toga is to be native as much as possible, and users might customize sound themes... so that's why despite discouragement from doing so, I'm using canberra-gtk-play in a subprocess.Popen for playing App.beep. Sorry for commenting on unrelated thread.

EDIT -- clarification: it's using some asyncio internal utils, not subprocess.Popen for ResourceWarning to not happen.

Copy link
Member

Choose a reason for hiding this comment

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

See https://doc.qt.io/qt-6/linux-requirements.html -- this is the list.

Ok - I can't argue with the documentation... but the fact that GTK is a dependency of Qt is odd, to say the least.

gnome-session-canberra is used for App.beep -- QApplication::beep does not work if pcspkr which is a very bad-noised module is enabled, and the proper way to do it in KDE is through KNotifications -- but then we'd have to bundle a .knotifyrc file which we currently does not support in Briefcase AFAICT, and that needs a meaningful event name. So we just use libcanberra here (canberra-gtk-play command line actaully) to play the freedesktop.org sound theme.

EDIT -- would it perhaps be more preferrable to use something like https://pypi.org/project/py-canberra/ for sounding the bell rather than calling it through the command line?

A command line invocation definitely isn't the right way to do it.

The fact that py-canberra has a version number of 0.0.4, and hasn't had an update since 2020, would seem to exclude it as a viable option.

As I've indicated previously - we can only cook with the ingredients we're given. If QApplication::beep() doesn't work, then that's a bug with Qt. If the KDE alternative doesn't work without a specific application configuration, then it won't ever be viable for a standalone pip install toga environment, so at best, it would need to be opt in.

So - if gnome-session-canberra is literally the only way to make this work, then I guess it's acceptable. However, I'd also be wary of trying to solve all Qt problems in one PR. Beep() isn't critical functionality. We can land a Qt backend that doesn't support beep at all, and fix that in a later PR when we're not also trying to get the basics of a stable Qt test setup nailed down.

To that end - it would be desirable if you stopped adding new features to this PR right now. Asking for a review means "This is done, and I'd like you to review it". I will, almost inevitably, find problems; you resolve those problems, and we converge on a PR that can be merged. Every time you add a new feature to a "review in progress" PR, that means another round of new problems that are going to be found.

The goal of every PR should be to as small as possible. A small PR is an easy to review PR. A sprawling PR that never stops getting bigger won't ever land. Right now, I'd like to focus on getting the specific feature set in this PR resolved so that we can land it, and then deal with improvements incrementally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@freakboy3742 Noted. I will stop adding new features. Pragmatically, should I revert this to QApplication.beep? Or since you said "I guess it's acceptable", should I keep it this way?

But anyways: py-canberra needed some patches for me to even run. Agreed on that part.

Searched up canberra by accident, found it was the capital of Australia... now I'm embarrased for asking an Australian what it's named after.



# Ubuntu 24.04 does not provide PySide6
# so we fake it like this to test system-pyside6.
# This bundles its own Qt.
sudo pip install --break-system-packages PySide6

# Start Virtual X Server
echo "Start X server..."
Xvfb :99 -screen 0 2048x1536x24 &
sleep 1

# Start Window Mmanager
echo "Start window manager..."
DISPLAY=:99 blackbox &
sleep 1
briefcase-run-prefix: 'DISPLAY=:99'
setup-python: false # Use the system Python packages
app-user-data-path: "$HOME/.local/share/testbed"

- backend: "linux-wayland-qt"
platform: "linux"
runs-on: "ubuntu-24.04"
testbed-app: "testbed-qt"
# The package list should be unix-prerequisites.md, plus mutter to provide a window
# manager.
pre-command: |
sudo apt update -y
sudo apt install -y --no-install-recommends \
mutter python3-dev xvfb \
gnome-session-canberra \
libfontconfig1-dev libfreetype-dev libgtk-3-dev \
libx11-dev libx11-xcb-dev libxext-dev \
libxfixes-dev libxi-dev libxkbcommon-dev \
libxkbcommon-x11-dev libxrender-dev 'libxcb*-dev' \
libwayland-dev libwayland-egl1-mesa libwayland-server0 \
libgles2-mesa-dev libxkbcommon-dev

# Ubuntu 24.04 does not provide PySide6
# so we fake it like this to test system-pyside6.
# This bundles its own Qt.
sudo pip install --break-system-packages PySide6

# Start Virtual X Server
echo "Start X server..."
Xvfb :99 -screen 0 2048x1536x24 &
sleep 1

# Start Window Manager
echo "Start window manager..."
# mutter is being run inside a virtual X server because mutter's headless
# mode does not provide a Gdk.Display
DISPLAY=:99 MUTTER_DEBUG_DUMMY_MODE_SPECS=2048x1536 \
mutter --nested --wayland --no-x11 --wayland-display toga &
sleep 1
briefcase-run-prefix: "WAYLAND_DISPLAY=toga"
setup-python: false # Use the system Python packages
app-user-data-path: "$HOME/.local/share/testbed"

- backend: "textual-linux"
platform: "linux"
runs-on: "ubuntu-latest"
Expand Down Expand Up @@ -428,7 +511,8 @@ jobs:
timeout-minutes: 15
run: |
${{ matrix.briefcase-run-prefix }} \
briefcase run ${{ matrix.platform }} --log --test ${{ matrix.briefcase-run-args }} -- --ci
briefcase run ${{ matrix.platform }} --log --test \
${{ matrix.briefcase-run-args }} --app ${{ matrix.testbed-app }} -- --ci

- name: Upload Logs
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/config-file-deps-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: beeware/.github/.github/workflows/dep-version-bump.yml@main
secrets: inherit
with:
subdirectory: . core dummy android cocoa demo dummy gtk iOS positron testbed textual toga travertino web winforms
subdirectory: . core dummy android cocoa demo dummy gtk qt iOS positron testbed textual toga travertino web winforms
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- "toga_demo"
- "toga_dummy"
- "toga_gtk"
- "toga_qt"
- "toga_positron"
- "toga_textual"
- "toga_ios"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
- "toga_demo"
- "toga_dummy"
- "toga_gtk"
- "toga_qt"
- "toga_ios"
- "toga_positron"
- "toga_textual"
Expand Down
1 change: 1 addition & 0 deletions android/tests_backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
class AppProbe(BaseProbe, DialogsMixin):
supports_key = False
supports_dark_mode = True
edit_menu_noop_enabled = False

def __init__(self, app):
super().__init__(app)
Expand Down
1 change: 1 addition & 0 deletions changes/1142.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Toga now provides a Qt backend for KDE-based desktops.
1 change: 1 addition & 0 deletions cocoa/tests_backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class AppProbe(BaseProbe, DialogsMixin):
supports_key_mod3 = True
supports_current_window_assignment = True
supports_dark_mode = True
edit_menu_noop_enabled = False

def __init__(self, app):
super().__init__()
Expand Down
3 changes: 3 additions & 0 deletions core/src/toga/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def key(self) -> tuple[tuple[int, int, str], ...]:
"""Window management commands"""
HELP: Group
"""Help commands"""
SETTINGS: Group
"""Preferences commands (used only for Qt backend by default)"""


Group.APP = Group("*", order=-100)
Expand All @@ -169,6 +171,7 @@ def key(self) -> tuple[tuple[int, int, str], ...]:
Group.COMMANDS = Group("Commands", order=30)
Group.WINDOW = Group("Window", order=90)
Group.HELP = Group("Help", order=100)
Group.SETTINGS = Group("Settings", order=80)


class ActionHandler(Protocol):
Expand Down
3 changes: 2 additions & 1 deletion docs/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ not_in_nav: |
/index.md
reference/api/widgets/table-values.md
reference/api/widgets/table-accessors.md
reference/platforms/unix-prerequisites.md
reference/platforms/gtk-prerequisites.md
reference/platforms/qt-prerequisites.md

validation:
omitted_files: warn
Expand Down
42 changes: 29 additions & 13 deletions docs/en/how-to/contribute/code.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ View the [macOS prerequisites][macos-prerequisites].

/// tab | Linux

View the [Linux prerequisites][linux-prerequisites].
View the [GTK prerequisites][linux-prerequisites] or the [Qt prerequisites][qt-prerequisites].

///

Expand Down Expand Up @@ -731,24 +731,34 @@ The above test suites exercise `toga-core` and `travertino` - but what about the

### Running the testbed app

To run the testbed app, install [Briefcase](https://briefcase.readthedocs.io/en/latest/), and run the app in developer test mode:
To run the testbed app, install [Briefcase](https://briefcase.readthedocs.io/en/latest/), and run the app in developer test mode as described below. Note that you should have only 1 backend -- the backend that you're planning to test -- installed in your virtual environment when running the test suite in developer mode.

/// tab | macOS

```console
(.venv) $ python -m pip install briefcase
(.venv) $ cd testbed
(.venv) $ briefcase dev --test
(.venv) $ briefcase dev --app testbed --test
```

///

/// tab | Linux

For testing the GTK backend:

```console
(.venv) $ python -m pip install briefcase
(.venv) $ cd testbed
(.venv) $ briefcase dev --test
(.venv) $ briefcase dev --app testbed --test
```

For testing the Qt backend:

```console
(.venv) $ python -m pip install briefcase
(.venv) $ cd testbed
(.venv) $ briefcase dev --app testbed-qt --test
```

///
Expand All @@ -758,7 +768,7 @@ To run the testbed app, install [Briefcase](https://briefcase.readthedocs.io/en/
```doscon
(.venv) C:\...>python -m pip install briefcase
(.venv) C:\...>cd testbed
(.venv) C:\...>briefcase dev --test
(.venv) C:\...>briefcase dev --app testbed --test
```

///
Expand All @@ -776,30 +786,36 @@ So - to run *only* the button tests in slow mode, you could run:
/// tab | macOS

```console
(.venv) $ briefcase dev --test -- tests/widgets/test_button.py --slow
(.venv) $ briefcase dev --app testbed --test -- tests/widgets/test_button.py --slow
```

///

/// tab | Linux

```console
(.venv) $ briefcase dev --test -- tests/widgets/test_button.py --slow
(.venv) $ briefcase dev --app testbed --test -- tests/widgets/test_button.py --slow
```

or

```console
(.venv) $ briefcase dev --app testbed-qt --test -- tests/widgets/test_button.py --slow
```

///

/// tab | Windows

```doscon
(.venv) C:\...>briefcase dev --test -- tests/widgets/test_button.py --slow
(.venv) C:\...>briefcase dev --app testbed --test -- tests/widgets/test_button.py --slow
```

///

This test will take a lot longer to run, but you'll see the widget (Button, in this case) go through various color, format, and size changes as the test runs. You won't get a coverage report if you run a subset of the tests, or if you enable slow mode.

### Running testbed in developer mode
### Running the testbed for mobile platforms

Developer mode is useful for testing desktop platforms (Cocoa, Winforms and GTK); but if you want to test a mobile backend, you'll need to use `briefcase run`.

Expand All @@ -808,13 +824,13 @@ Developer mode is useful for testing desktop platforms (Cocoa, Winforms and GTK)
To run the Android test suite:

```console
(.venv) $ briefcase run android --test
(.venv) $ briefcase run android --app testbed --test
```

To run the iOS test suite:

```console
(.venv) $ briefcase run iOS --test
(.venv) $ briefcase run iOS --app testbed --test
```

///
Expand All @@ -824,7 +840,7 @@ To run the iOS test suite:
To run the Android test suite:

```console
(.venv) $ briefcase run android --test
(.venv) $ briefcase run android --app testbed --test
```

iOS tests can't be executed on Linux.
Expand All @@ -836,7 +852,7 @@ iOS tests can't be executed on Linux.
To run the Android test suite:

```doscon
(.venv) C:\...>briefcase run android --test
(.venv) C:\...>briefcase run android --app testbed --test
```

iOS tests can't be executed on Windows.
Expand Down
4 changes: 2 additions & 2 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Toga is a Python native, OS native, cross-platform GUI toolkit. Toga consists of a library of base components with a shared interface to simplify platform-agnostic GUI development.

Toga is available on macOS, Windows, Linux (GTK), Android, iOS, for single-page web apps, and console apps.
Toga is available on macOS, Windows, Linux (GTK or Qt), Android, iOS, for single-page web apps, and console apps.

/// tab | macOS

Expand All @@ -16,7 +16,7 @@ Toga is available on macOS, Windows, Linux (GTK), Android, iOS, for single-page

///

/// tab | Linux
/// tab | Linux (GTK)

![/images/toga-demo-gtk.png](/images/toga-demo-gtk.png){ width="450" }

Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The top-level representation of an application.
Availability ([Key][api-status-key]) <!-- rumdl-disable-line MD013 -->
{: .availability-title }

{{ pd_read_csv("../data/widgets_by_platform.csv", na_filter=False, usecols=[4,5,6,7,8,9,10])[pd_read_csv("../data/widgets_by_platform.csv")[["ComponentName"]].isin(["Application"]).all(axis=1)] | convert_to_md_table }}
{{ pd_read_csv("../data/widgets_by_platform.csv", na_filter=False, usecols=[4,5,6,7,8,9,10,11])[pd_read_csv("../data/widgets_by_platform.csv")[["ComponentName"]].isin(["Application"]).all(axis=1)] | convert_to_md_table }}

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/api/containers/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A generic container for other widgets. Used to construct layouts.
Availability ([Key][api-status-key]) <!-- rumdl-disable-line MD013 -->
{: .availability-title }

{{ pd_read_csv("../../data/widgets_by_platform.csv", na_filter=False, usecols=[4,5,6,7,8,9,10])[pd_read_csv("../../data/widgets_by_platform.csv")[["ComponentName"]].isin(["Box"]).all(axis=1)] | convert_to_md_table }}
{{ pd_read_csv("../../data/widgets_by_platform.csv", na_filter=False, usecols=[4,5,6,7,8,9,10,11])[pd_read_csv("../../data/widgets_by_platform.csv")[["ComponentName"]].isin(["Box"]).all(axis=1)] | convert_to_md_table }}

## Usage

Expand Down
Loading
Loading