question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Radiobuttons are duplicated during `reset_choices` in Qt <5.15.2

See original GitHub issue

Describe the bug

When creating a napari plugin and adding RadioButtons widget with magicgui, every radiobutton appears duplicated (see screenshot).

To Reproduce

Create a simple plugin consisting out of a single group of RadioButtons


from napari_plugin_engine import napari_hook_implementation
from magicgui import magicgui

def wrapper():
    @magicgui (
        choices = dict(widget_type='RadioButtons', label='Choices',
                   orientation='horizontal', choices=["A","B","C"])
    )
    def widget (
            choices
    ):
        pass
    return widget


@napari_hook_implementation
def napari_experimental_provide_dock_widget():
    return wrapper, {'name': 'BUG'}


if __name__ == '__main__':

    import napari

    with napari.gui_qt():
        viewer =  napari.Viewer()

        key = ("BUG", "BUG") 

        viewer.window._add_plugin_dock_widget(key)

Screenshots

Screenshot 2021-03-24 at 16 18 01

Environment (please complete the following information):

OS        OSX 10.15.7
QT        5.15.1
napari    0.4.6
magicgui  0.2.8.dev14+g9590805

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tlambert03commented, Mar 24, 2021

fixed in #198 … will release another patch release (0.2.9) shortly

1reaction
maweigertcommented, Mar 24, 2021

Sure, thanks for the super fast response!

And yes, I didn’t see it in plain magicgui so moving the napari might make sense.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Radio Buttons showing duplicate values in console
I'm using QT designer to try and make a couple of radio buttons with a label that shows which button I've selected in...
Read more >
RadioButton QML Type | Qt Quick Controls 6.4.1
RadioButton presents an option button that can be toggled on (checked) or off (unchecked). Radio buttons are typically used to select one option...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found