pyqt5中带有无线电按钮的弹出消息框

我有一个python函数,将弹出消息显示为qmessagebox,其中包括一组单选按钮,其中单选按钮是从列表中初始化的。

该列表是根据数据框的dtypes创建的,并返回列名称。

问题是,当消息弹出时,它不包含任何单选按钮。

我的代码中的错误在哪里?

  def showColumnINTType(self,df):
        msg = QtWidgets.QMessageBox()    
        msg.setWindowTitle("Numeric Columns")
        msg.setText("Select the column to add to pie chart values")
        msg.setIcon(QtWidgets.QMessageBox.Question)
        msg.setStandardButtons(QMessageBox.Cancel | QMessageBox.Retry | QMessageBox.Ignore)
        self.my_vertical_layout = QHBoxLayout()
        column_int_types=([key for key in dict(df.dtypes) if dict(df.dtypes)[key] in ['float64','int64']])
        for cit in column_int_types:
            q_int_type = QtWidgets.QRadioButton(cit,self)
            self.my_vertical_layout.addWidget(q_int_type)
        x = msg.exec_()

我将不胜感激

wupengtao000 回答:pyqt5中带有无线电按钮的弹出消息框

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/1367094.html

大家都在问