[Dip @phil Thompson] A small popover is displayed first If you RadioButtons, how to fix it?

孤木成林 625781186 at qq.com
Thu May 28 15:51:52 BST 2020


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)



```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200528/db12ea34/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2E39D12E at D332BD58.08D0CF5E.gif.jpg
Type: image/jpeg
Size: 133090 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200528/db12ea34/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dialog3.py
Type: application/octet-stream
Size: 674 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200528/db12ea34/attachment-0001.obj>


More information about the PyQt mailing list