Skip to content

ENH: add LazyWidget#55

Merged
ZLLentz merged 1 commit into
pcdshub:masterfrom
klauer:lazy
Jun 2, 2022
Merged

ENH: add LazyWidget#55
ZLLentz merged 1 commit into
pcdshub:masterfrom
klauer:lazy

Conversation

@klauer
Copy link
Copy Markdown
Contributor

@klauer klauer commented May 27, 2022

Description

Untested LazyWidget, borrowed/tweaked from pcdshub/typhos#500

Motivation and Context

How Has This Been Tested?

Where Has This Been Documented?

Comment thread pcdsutils/qt/lazy.py
self.widget = None

self.setVisible(False)
self.setLayout(QtWidgets.QVBoxLayout())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see no reason not to merge this utility, but one small thought: does this create any subtle layout problems with the default margins of QVBoxLayout?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think there are improvements that could be made with respect to layout padding/margins, for sure. The subtleties were not investigated at all.

I'd be OK with either:

  • Iterating on this prior to merging (as we have no immediate need)
  • Or merging and then circling back (when the need arises)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, I'm going to press the merge button then.
I only mentioned margins here because the default margins on all layouts is nonzero, so I expect all LazyWidgets to be slightly smaller than intended

@ZLLentz ZLLentz merged commit 69cf8f7 into pcdshub:master Jun 2, 2022
@klauer klauer deleted the lazy branch June 2, 2022 18:58
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