QComboBox的继承图:

PyQt5 控件学习(一个一个学习之QComboBox)

QComboBox的描述:

PyQt5 控件学习(一个一个学习之QComboBox)

通过下拉框,选择更多的预置选项 !

 

 

 

QComboBox的继承:

它直接继承自 QWidget 

 

QComboBox的功能作用:

QComboBox的功能作用之构造函数:

PyQt5 控件学习(一个一个学习之QComboBox)

 

from PyQt5.Qt import * #刚开始学习可以这样一下导入
import sys

class Window(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("QComboBox的学习")
        self.resize(400,400)
        self.set_ui()


    def set_ui(self):
        comboBox = QComboBox(self)
        comboBox.resize(100,30)
        comboBox.move(100,100)



if __name__ == '__main__':
    app =QApplication(sys.argv)

    window = Window()
    window.show()

    sys.exit(app.exec_())
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-02
  • 2021-10-18
  • 2021-06-15
  • 2021-12-05
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案