MCPcopy Create free account
hub / github.com/PyQt5/PyQt / FramelessComboBox

Function FramelessComboBox

QComboBox/ComboBoxStyle.py:105–114  ·  view source on GitHub ↗
(comboBox, minWidth=50)

Source from the content-addressed store, hash-verified

103
104
105def FramelessComboBox(comboBox, minWidth=50):
106 comboBox.setView(QListView())
107 view = comboBox.view()
108 view.setMinimumWidth(comboBox.width() + minWidth)
109 if view.parentWidget():
110 p = view.parentWidget()
111 p.setAttribute(Qt.WA_TranslucentBackground)
112 p.setWindowFlags(
113 p.windowFlags() | Qt.FramelessWindowHint | Qt.NoDropShadowWindowHint
114 )
115
116
117class ComboBoxStyle(QWidget):

Callers 1

__init__Method · 0.85

Calls 1

widthMethod · 0.45

Tested by

no test coverage detected