Pyqt5 implementation drop-down check box

Time:2021-10-17

Recently, I wrote a client tool with pyqt5, which needs the effect of the drop-down check box, but the built-in one is not provided. I found the following onlineComboCheckBoxClass can be implemented;

It is mainly the combination of drop-down radio and check box, which inheritsQComboBoxClasses, instantiationComboCheckBoxYou can implement the drop-down check box.

Pyqt5 implementation drop-down check box

The code is as follows:

from PyQt5.QtWidgets import QComboBox, QLineEdit, QListWidget, QCheckBox, QListWidgetItem

Original text:bgods.cn/blog/post/52/

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Recommended Today

OC basis

IOS development interview essential skills chart.png What are objects and what are the objects in OC? An object is an instance of a class; Is an instance created through a class, which is generally called an instance object; Common objects in OC include instance objects, class objects, and metaclass objects; What is a class? What […]