-2

I want to remove the dropdown from the QgsSymbolButton.

QgsSymbolButton

4
  • Any use?
    – Hornbydd
    Feb 12 at 15:21
  • no, its going into a plugin so i have to overwrite something. But i dont know what and how.
    – Nukufel
    Feb 12 at 15:27
  • Your first step should be to read the documentation for the QToolButton base class. Hint: your_btn.setPopupMode(QToolButton.DelayedPopup). That will remove the dropdown arrow. Instead the popup menu will show after user clicks and holds tool button for a period. Default is 600ms. To change that, implement your own QProxyStyle subclass, override the styleHint() method and return a large integer for the QStyle.SH_ToolButton_PopupDelay hint. Then set the custom style to your button.
    – Ben W
    Feb 13 at 1:19
  • thx this worked
    – Nukufel
    Feb 13 at 7:30

0

Browse other questions tagged or ask your own question.