mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-17 13:58:05 +00:00
Python: Make space for additional python modules
Move Slint module into sub-directory under api/python
This commit is contained in:
parent
ad2766518e
commit
86befbe769
43 changed files with 31 additions and 31 deletions
|
@ -38,7 +38,7 @@ def test_property_access() -> None:
|
|||
finished: true,
|
||||
dash-prop: true,
|
||||
};
|
||||
in property <image> imageprop: @image-url("../../../demos/printerdemo/ui/images/cat.jpg");
|
||||
in property <image> imageprop: @image-url("../../../../demos/printerdemo/ui/images/cat.jpg");
|
||||
|
||||
callback test-callback();
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ def test_property_access() -> None:
|
|||
Image.load_from_path(
|
||||
os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
"../../../examples/iot-dashboard/images/humidity.png",
|
||||
"../../../../examples/iot-dashboard/images/humidity.png",
|
||||
)
|
||||
),
|
||||
)
|
||||
|
@ -193,7 +193,7 @@ def test_callbacks() -> None:
|
|||
if __name__ == "__main__":
|
||||
import slint
|
||||
|
||||
module = slint.load_file(Path("../../demos/printerdemo/ui/printerdemo.slint"))
|
||||
module = slint.load_file(Path("../../../demos/printerdemo/ui/printerdemo.slint"))
|
||||
instance = module.MainWindow()
|
||||
instance.PrinterQueue.start_job = lambda title: print(f"new print job {title}")
|
||||
instance.run()
|
|
@ -15,7 +15,7 @@ def test_magic_import_path() -> None:
|
|||
oldsyspath = sys.path
|
||||
assert loader.printerdemo is None
|
||||
try:
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))
|
||||
instance = loader.demos.printerdemo.ui.printerdemo.MainWindow()
|
||||
del instance
|
||||
finally:
|
Loading…
Add table
Add a link
Reference in a new issue