Change checkbox position for a QCheckBox

前端 未结 2 1690
忘掉有多难
忘掉有多难 2021-01-19 07:33

I have a QCheckbox in a grid layout defined as such:

self.isSubfactorCheckbox = QtGui.QCheckBox(\'Is &subfactor\', self)

By default the

2条回答
  •  耶瑟儿~
    2021-01-19 07:52

    Use the buddy mechanism. Set the QCheckBox to the buddy of the QLabel. After that prefix & will underline the shortcut character in the label. See the documentation of the QLabel's setBuddy.

提交回复
热议问题