-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing python wrapping of ctkCheckableHeaderView #793
Comments
Could you please send a pull request that fixes the problem? |
The problem occurs because ctkCheckableHeaderView constructor does not have the desired signature (as specified by ctkWrapPythonQt.py). Please advise about the desirable solution to this. Here are the options that I can think of:
|
Adding a constructor that does not require any input arguments sounds like a simple solution. |
I encountered the same problem. @lassoan It is a little problematic to add a constructor that doesn't require any input argument as I solved this by creating two classes (one for horizontal header and another for vertical by analogy with
This solution would mean that from C++ one is free to use any of 3 ctk header views while in python there are only 2 classes would be available. Also there are at least two methods that
I think we should move them to If you agree or have some sugestions I could make a PR |
Creating the extra classes sounds like a good solution to the constructor issue. The other two you listed do look like they should be slots, but |
Do not create new classes if you just want to a make additional constructors accessible from Python! Just add the appropriate decorator methods. There are several examples for this in CTK. Do not export checkableModelHelper, as it sounds like an internal helper class. To make simple properties (int, string, string list, enum,...) accessible from Python, it is preferable to declare them as properties as @pieper suggested above. |
Today I have achieved some success in understanding PythonQt decorator's staff (mostly from this article) and I think tomorrow I will try to implement it in |
Thanks for posting the link to that article, somehow I never saw it before (wish I'd read it years ago!). |
Closed by fa1732f. |
While using Slicer I noticed that the python wrapping for the ctkCheckableHeaderView was missing.
There was ctkCheckableHeaderViewEventPlayer() and ctkCheckableHeaderViewEventTranslator(), but the main widget was missing.
The text was updated successfully, but these errors were encountered: