Qt equivalent of .NET data binding?

前端 未结 3 1973
北恋
北恋 2021-02-07 02:07

Is there an equivalent of .NET\'s data binding in Qt?

I want to populate some combo boxes and other widgets with QStrings that refer to specific entities in my database.

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-07 02:27

    Well, for combobox specifically, you can set a model. For QObjects in general you can use the notify signal for properties to connect or other non-property related signals. I think there is another way to do it but I can't recall.

提交回复
热议问题