How Do i remove down arrow when setting menu on pushbutton?
Solved
General and Desktop
-
wrote on 10 Nov 2016, 06:56 last edited by
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 ? -
wrote on 10 Nov 2016, 07:50 last edited by
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.
-
wrote on 10 Nov 2016, 08:06 last edited by
Thanks It worked!!
1/3