QComboBox_00_basic.py 文件源码

python
阅读 87 收藏 0 点赞 0 评论 0

项目:OpenTutorials_PyQt 作者: RavenKyu 项目源码 文件源码
def init_widget(self):
        """
        ?? ??? ???? ???
        """
        self.setWindowTitle("QComboBox Widget")
        form_lbx = QBoxLayout(QBoxLayout.TopToBottom, parent=self)
        self.setLayout(form_lbx)

        lb = QLabel()

        qb = QComboBox()
        qb.addItem("Banana")  # ?? ??? ???
        qb.addItems(["Apple", "Tomato", "Carrot"])  # ?? ??? ???
        qb.insertSeparator(2)  # ?? ?
        qb.currentTextChanged.connect(lb.setText)  # ?? ???? ???? ?? ?

        form_lbx.addWidget(qb)
        form_lbx.addWidget(lb)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号