PDA

View Full Version : How to change the qcombobox down arrow width size?



Jeff100
13th October 2017, 07:23
Hello,

I have to following code to add a qcombobox to the toolbar, the icon is displayed in the drop-down with QSize(32,32), but the down-arrow width is also set the same, is there any way to change the down-arrow width size? So that it could look like the one with the red line.

QComboBox* cb = new QComboBox();
cb->setIconSize(QSize(32, 32));
cb->addItem(QIcon(":/images/default_view.png"), QString(""));
cb->addItem(QIcon(":/images/front_view.png"), QString(""));
QWidgetAction* wa = new QWidgetAction(0);
wa->setDefaultWidget(cb);
viewtoolbar->addAction(wa);

Thanks