L
L
leviathan2021-06-04 06:59:20
PyQt
leviathan, 2021-06-04 06:59:20

How to remove right-arrow from QPushButton + QMenu?

Here is a sample code

menu = QMenu()
menu.addAction('Settings', lambda: print('hello!'))
        
self.btn_dialog = QPushButton('Я кнопка')
self.btn_dialog.setMenu(menu)
self.layout_wrapper.addWidget(self.btn_dialog)


Just initializing the menu and then pushing it under the button. Everything would be fine, but QMenu adds an arrow to QPushButton: 60b9a3d77f665933894605.png
How to remove this arrow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WolfInChains, 2021-06-04
@The_Lars

QPushButton::menu-indicator {
    height: 0px;
    width: 0px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question