Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python PyQt Hide QToolbutton Menu arrow

Tags:

python

pyqt

I want to hide the Small Down Arrow that appears on the QToolButton if i set a QMenu to it.

I have tried using StyleSheet by setting QToolButton menu-arrow image to none. The following is my Qss code:

QToolButton
{
    border:1px solid #B6C4DB;
      border-radius:12px;
      padding:2px;
      margin-left:5px;
}

QToolButton::menu-arrow
{
    image:none;
} 

QToolButton:pressed 
{
         border:1px solid #D6BB0B;
}

Is there a way to hide that small arrow on QToolButton with a menu?

like image 322
Chris Aung Avatar asked Nov 15 '13 02:11

Chris Aung


2 Answers

QToolButton::menu-indicator { image: none; }
like image 59
Chris Aung Avatar answered Sep 30 '22 13:09

Chris Aung


posting my comment as a potential answer (at least for now): Looks like this is a bug but this page lists a workaround

like image 29
Frank Rueter Avatar answered Sep 30 '22 15:09

Frank Rueter