在Qt Designer中,可以在界面中使用QDialogButtonBox来配置一组按钮进行操作,Qt中为QDialogButtonBox定义了一组常用的标准按钮,可以在Designer中直接在StandardButtons属性中指定使用,配置界面如图:
PyQt(Python+Qt)学习随笔:Designer中的QDialogButtonBox的StandardButtons标准按钮
StandardButtons标准按钮属性与枚举类型QDialogButtonBox.StandardButton类型相对应,具体取值及含义如下:

PyQt(Python+Qt)学习随笔:Designer中的QDialogButtonBox的StandardButtons标准按钮

其中的按钮角色ButtonRole的含义及用途请参考《PyQt(Python+Qt)学习随笔:Designer中的QDialogButtonBox的ButtonRole详解》。

PyQt(Python+Qt)学习随笔:Designer中的QDialogButtonBox的StandardButtons标准按钮

老猿Python,跟老猿学Python!

博文目录

博客地址

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-04-13
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案