Qt QToolBox Tab 高度的设置,不同 Tab 高度不同

After speaking with Qt support, the only way I found was to assign an empty icon to all tabs, and set the icon-size to the desired height.

By laurapons

...
for (int i = 0; i < ui->toolBox->count(); i++){
    ui->toolBox->setItemIcon( i, QIcon(":/shared/empty"));
}
ui->toolBox->setStyleSheet("QToolBox{ icon-size: 48px; }");
...

 

posted on 2020-12-18 18:14  liujx2019  阅读(841)  评论(0编辑  收藏  举报

导航