Skip to content

Instantly share code, notes, and snippets.

@HalfWhitt
Created January 9, 2024 02:39
Show Gist options
  • Save HalfWhitt/3ac1c007c30876b0f9cc22360bbcf011 to your computer and use it in GitHub Desktop.
Save HalfWhitt/3ac1c007c30876b0f9cc22360bbcf011 to your computer and use it in GitHub Desktop.
Testing Merge All Windows
import toga
class WindowSubclass(toga.Window):
pass
class TestMergeApp(toga.App):
def startup(self):
self.main_window = toga.MainWindow(title="Main Window")
self.main_window.show()
base_windows = [toga.Window(title="Base Window") for _ in range(2)]
subclass_windows = [WindowSubclass(title="Subclassed Window") for _ in range(2)]
for window in [*base_windows, *subclass_windows]:
window.show()
if __name__ == '__main__':
app = TestMergeApp("Merge All Windows Test", "com.example.test")
app.main_loop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment