TheImagingSource / ic4-examples

IC4 Example Programs
Apache License 2.0
5 stars 3 forks source link

Device properties window #10

Open Kubiczek36 opened 5 months ago

Kubiczek36 commented 5 months ago

Hello,

I would like to use the grabber_device_properties method, however I don't know, what should be provided with the parent (I assume it's not just any int) Please, could you provide a simple Python example for this method.

Thank you in advance!

TIS-Tim commented 5 months ago

Hello,

the function expects a numeric value for the HWND of the parent window.

Not sure which toolkit you use, but this example is calling one of the dialog functions and extracts the window handle from a Qt window:

https://github.com/TheImagingSource/ic4-examples/blob/f51b215a30b0bfb176c626140520768ebcaac9dc/python/qt6/qt6-first-steps/qt6-first-steps.py#L28

TIS-Tim commented 1 month ago

With ic4 release 1.2, there are pre-built propery dialogs for use with PySide6:

https://www.theimagingsource.com/en-us/documentation/ic4python/api-reference.html#pyside6-integration