This is a question for the #FreeCAD #macro people: I’ve created a dialog box with 3 radio buttons. The correct default button is selected, but I can’t figure out why the first button is highlighted? I’ve been reading through the documentation for QRadiobutton, but I can’t figure out why the toggled button isn’t highlighted.

Anyone have any ideas?

#pyside #qt #pyqt

@chrishuck No idea, but that highlight is called focus and QRadioButton seems to have some methods related to it.

@elgregor That is correct. The .setFocus() method does what I want, as mentioned in the reply above 👆 .

I looked for it in the Qt Python docs for QRadioButton, but I didn’t see any mention of that method. I thought I’d just missed it.

Thanks for relying!

Follow

@chrishuck Glad it works. I don't see any replies other than mine. Either instances of other repliers don't want to federate with mine or my instance is just bugged.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml