<legend id='7mXId'><style id='7mXId'><dir id='7mXId'><q id='7mXId'></q></dir></style></legend>

    1. <small id='7mXId'></small><noframes id='7mXId'>

        <bdo id='7mXId'></bdo><ul id='7mXId'></ul>
      <tfoot id='7mXId'></tfoot>
    2. <i id='7mXId'><tr id='7mXId'><dt id='7mXId'><q id='7mXId'><span id='7mXId'><b id='7mXId'><form id='7mXId'><ins id='7mXId'></ins><ul id='7mXId'></ul><sub id='7mXId'></sub></form><legend id='7mXId'></legend><bdo id='7mXId'><pre id='7mXId'><center id='7mXId'></center></pre></bdo></b><th id='7mXId'></th></span></q></dt></tr></i><div id='7mXId'><tfoot id='7mXId'></tfoot><dl id='7mXId'><fieldset id='7mXId'></fieldset></dl></div>

    3. QButtonGroup 没有使复选框独占

      时间:2023-08-05
        1. <tfoot id='hEhz4'></tfoot>
            <i id='hEhz4'><tr id='hEhz4'><dt id='hEhz4'><q id='hEhz4'><span id='hEhz4'><b id='hEhz4'><form id='hEhz4'><ins id='hEhz4'></ins><ul id='hEhz4'></ul><sub id='hEhz4'></sub></form><legend id='hEhz4'></legend><bdo id='hEhz4'><pre id='hEhz4'><center id='hEhz4'></center></pre></bdo></b><th id='hEhz4'></th></span></q></dt></tr></i><div id='hEhz4'><tfoot id='hEhz4'></tfoot><dl id='hEhz4'><fieldset id='hEhz4'></fieldset></dl></div>

            <small id='hEhz4'></small><noframes id='hEhz4'>

                <tbody id='hEhz4'></tbody>

                <bdo id='hEhz4'></bdo><ul id='hEhz4'></ul>

                <legend id='hEhz4'><style id='hEhz4'><dir id='hEhz4'><q id='hEhz4'></q></dir></style></legend>

                本文介绍了QButtonGroup 没有使复选框独占的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在尝试使用 QGroupBox 制作一组排他性复选框(据我所知,默认情况下是排他性的),但是当我运行我的程序时,复选框不是排他性的,并且它们的行为正常.

                I am attempting to make a set of exclusive checkboxes, using QGroupBox (which, as I understand it, is exclusive by default), but when I run my program, the checkboxes are not exclusive and behave as they normally would.

                skillP = QCheckBox("Passive")
                skillCb = QCheckBox("Combat")
                skillCm = QCheckBox("Command")
                skillP.setChecked(True)
                addskillG = QButtonGroup()
                addskillG.addButton(skillP)
                addskillG.addButton(skillCm)
                addskillG.addButton(skillCb)
                

                是不是我做错了什么?

                推荐答案

                这个问题是因为垃圾收集器从内存中移除了变量QButtonGroup,要解决这个问题你必须给这个对象传递一个父对象:

                The problem is caused because the garbage collector removes from the memory the variable QButtonGroup, to solve that problems you must pass a parent to this object:

                addskillG = QButtonGroup(self)
                

                这篇关于QButtonGroup 没有使复选框独占的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:我如何用 pafy 为进度条制作线程 下一篇:如何在 PyQt5 窗口中嵌入 pptk 查看器

                相关文章

                最新文章

                <legend id='RDn4V'><style id='RDn4V'><dir id='RDn4V'><q id='RDn4V'></q></dir></style></legend>

                  • <bdo id='RDn4V'></bdo><ul id='RDn4V'></ul>
                  <i id='RDn4V'><tr id='RDn4V'><dt id='RDn4V'><q id='RDn4V'><span id='RDn4V'><b id='RDn4V'><form id='RDn4V'><ins id='RDn4V'></ins><ul id='RDn4V'></ul><sub id='RDn4V'></sub></form><legend id='RDn4V'></legend><bdo id='RDn4V'><pre id='RDn4V'><center id='RDn4V'></center></pre></bdo></b><th id='RDn4V'></th></span></q></dt></tr></i><div id='RDn4V'><tfoot id='RDn4V'></tfoot><dl id='RDn4V'><fieldset id='RDn4V'></fieldset></dl></div>

                1. <tfoot id='RDn4V'></tfoot>

                    <small id='RDn4V'></small><noframes id='RDn4V'>