A small popover is displayed first If you RadioButtons, how to fix it?

Phil Thompson phil at riverbankcomputing.com
Tue Jun 2 05:31:43 BST 2020


On 28/05/2020 15:51, 孤木成林 wrote:
> Code :
> 
> ```
> 
> from dip.model import Enum, Model, Str, Int, unadapted
> from dip.ui import Application, Dialog, SpinBox, HBox,
> DialogController, RadioButtons, CheckBox, ComboBox
> 
> class DataModel(Model):
>     name = Str("")
>     w = Int(100)
>     h = Int(100)
>     test = Enum("1", "2", "3")
> 
> model = DataModel()
> 
> # Every application needs an Application.
> app = Application()
> 
> view_factory = Dialog(
> 
>     RadioButtons('test',),
>     # ComboBox('test', vertical = False),
>     HBox('name',
>          SpinBox('w', suffix = " years"),
>          SpinBox('h', suffix = " years"),
>          ),
>     window_title = "Dialog with Settings")
> 
> view = view_factory(model)
> view.execute()
> print("Name:", model.name)
> 
> ```

Sorry, I can't reproduce the problem.

Phil


More information about the PyQt mailing list