Opened 4 years ago
Closed 3 years ago
#6425 closed defect (fixed)
Qt6: Mac default button goes blank if dialog loses focus
Reported by: | Elaine Meng | Owned by: | Zach Pearson |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Window Toolkit | Version: | |
Keywords: | Cc: | Tom Goddard, pett | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
On a Mac, bring up MatchMaker and then click into the model panel. Note that the MatchMaker OK button goes from white text on blue background to (invisible) white text on white background.
Attachments (1)
Change History (12)
comment:1 by , 4 years ago
follow-up: 2 comment:2 by , 4 years ago
The bug is not specific to MatchMaker. Any tool, e.g. Clashes with a default button has this behavior with Qt 6 on Mac. I tried it just now on Intel Mac. Same problem. It is not specific to M1. It is a Qt 6 Mac bug.
follow-up: 4 comment:4 by , 4 years ago
If there is no Qt bug report for this problem, I would not expect a quick fix in a new Qt release. We may need to make a simple test case and report it. I don't think this bug is a show stopper for ChimeraX 1.4 release. It is a small nuisance.
by , 4 years ago
Attachment: | windows.py added |
---|
comment:5 by , 4 years ago
I adapted some boilerplate code from the internet into a minimal test case (as someone else did in the tabbedtoolbar file) and this bug may be from some quirk in our code. When I run the attached script and click the button, I see a small popup window with a QDialogButtonBox
. Clicking away from the window, the text does not go blank as it does in ChimeraX. Do we change away from the default stylesheet somewhere?
comment:6 by , 4 years ago
The main UI code doesn't use stylesheets. Interestingly, if you bring up both MatchMaker and H-Bonds, clicking from one to the other behaves normally, with the focused default button being white text on blue, and the unfocused dialog black on white, but clicking into the main window makes both white on white.
comment:7 by , 4 years ago
Also, docking these dialogs into the main window causes them to behave normally, making stylesheets an unlikely culprit.
comment:8 by , 4 years ago
I see. If I remove the OK button from the QDialogButtonBox initializer and make it myself, the symptom still appears as long as it's given the 'AcceptRole' role.
comment:10 by , 4 years ago
Even weirder: if you can somehow get the OK button's text to become black, say by having an error dialog pop up, the text does not change back to white when the window is selected. So there's some problem with reacting to some focus event.
comment:11 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Seems to have been fixed by Greg's recent PyQt update.
Strange; the tool hasn't been committed to in a year and the build on my M1 Mac from February doesn't exhibit the problem, but sure enough if I download the daily build it's there.