Solved How Do i remove down arrow when setting menu on pushbutton?
-
QMenu *menu=new QMenu(); QAction *act1=new QAction(); QAction *act2=new QAction(); act1->setText("1"); act2->setText("2"); menu->addAction(act1); menu->addAction(act2); ui->pushButton->setAutoFillBackground(1); ui->pushButton->setIcon(QIcon("/home/einfochips/BEL_VMS_CLIENT/images/user.png")); ui->pushButton->setMenu(menu);
I get down arrow in pushbutton. I want to remove that arrow HOw Can I ?
I s that another method ? -
Re: How Do i remove down arrow when setting menu on pushbutton?
Hi.
Just something like this:
pushButton->setStyleSheet("::menu-indicator{ image: none; }");
But you will need to adjust the alignment for button text.
-
Re: How Do i remove down arrow when setting menu on pushbutton?
Hi.
Just something like this:
pushButton->setStyleSheet("::menu-indicator{ image: none; }");
But you will need to adjust the alignment for button text.
-
Thanks It worked!!