Skip to content
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

Unable to add additional widgets within UISliderWidget #173

Open
jcornall opened this issue Dec 18, 2024 · 0 comments
Open

Unable to add additional widgets within UISliderWidget #173

jcornall opened this issue Dec 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jcornall
Copy link
Collaborator

jcornall commented Dec 18, 2024

The current implementation of the UISliderWidget restricts the addition of further widgets within the class itself (e.g. by adding and setting a layout).

The only available workaround that preserves inheritance involves passing other widgets to the class as an argument, and connecting the slider to the widgets (and vice versa) inside the class. Using this method, each widget can be added to the FormDialog, which preserves getting/setting widget states in the UIFormWidget class. However, this isn't ideal as it is limits the complexity of the widgets you can construct in the FormDialog (both in terms of functionality and layout). Adding widgets to the FormDialog using the addWidget() method only allows the user to add widgets vertically, with no support for horizontal widgets.

As a subclass of QSlider, adding the slider to a layout created within the class causes the window to crash (it is recursive, the slider contains the layout which contains the slider etc.).

See also #125, #174, #175

@jcornall jcornall added the bug Something isn't working label Dec 18, 2024
@jcornall jcornall changed the title Unable to add additional widgets within UISliderWidget Unable to add additional widgets within UISliderWidget Dec 18, 2024
@jcornall jcornall added enhancement New feature or request and removed bug Something isn't working labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant