Skip to content

Conversation

@loichuder
Copy link
Member

@loichuder loichuder commented Jan 9, 2026

For #4428

Before After
image image

I didn't see a way of doing this without a GridLayout. Unfortunately, this means breaking the encapsulation of _Axis since the elements of _Axis (slider, label, and combobox) need to be added individually to the layout.

Not very happy about this, tell me what you think.

@loichuder loichuder marked this pull request as draft January 9, 2026 11:20
@loichuder loichuder force-pushed the fix-numpy-axes-selector-aligment branch from e449716 to fc09851 Compare January 13, 2026 14:11
else:
axisLabel = f"{label} (Dim{number})"

self.__label = qt.QLabel(axisLabel, parent=self)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making _label, _axes and _slider available outside of _Axis.

self.removeWidget(axis._axes)
axis._axes.deleteLater()
self.removeWidget(axis._slider)
axis._slider.deleteLater()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleteLater seem to be needed for every individual component. I had some weird stuff with duplicate widgets without this.

@loichuder loichuder requested a review from t20100 January 13, 2026 14:16
@loichuder loichuder self-assigned this Jan 13, 2026
@loichuder loichuder marked this pull request as ready for review January 13, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants