mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-09-21 00:54:25 +08:00
chore(tests): adding tests for Qt widgets (#300)
* chore(tests): adding tests for Qt widgets * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: reset WINDOW name * chore(tests): addign tests * chore: adding more tests * fix how bin existence is checked * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: which takes str * more tests! * todo: fix * change verbosity in tests --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
14
manim_slides/qt_utils.py
Normal file
14
manim_slides/qt_utils.py
Normal file
@ -0,0 +1,14 @@
|
||||
"""Qt utils."""
|
||||
|
||||
from PySide6.QtWidgets import QApplication
|
||||
|
||||
|
||||
def qapp() -> QApplication:
|
||||
"""
|
||||
Return a QApplication instance, creating one
|
||||
if needed.
|
||||
"""
|
||||
if app := QApplication.instance():
|
||||
return app
|
||||
|
||||
return QApplication([])
|
Reference in New Issue
Block a user