Hi all, struggling trying to figure out how to set different StyleSheet for the tabs of the same bar. Specifically I would need to have some tabs of a size, and some others, actually only the last one at the moment, of a smaller size. However, it seems the last always and only applies, even if I specify it differently. So for example, the following does not solve:
ui->tabWidget->setStyleSheet("QTabBar::tab { width: 120px; }");
ui->tabWidget->setStyleSheet("QTabBar::tab:last { width: 20px; }");
ui->tabWidget->setStyleSheet("QTabBar::tab { width: 120px; }");
ui->tabWidget->setStyleSheet("QTabBar::tab:last { width: 20px; }");
To copy to clipboard, switch view to plain text mode
ui->tabWidget->setStyleSheet("QTabBar::tab { width: 120px; }");
ui->tabWidget->setStyleSheet("QTabBar::tab:last { width: 20px; }");
ui->tabWidget->setStyleSheet("QTabBar::tab { width: 120px; }");
ui->tabWidget->setStyleSheet("QTabBar::tab:last { width: 20px; }");
To copy to clipboard, switch view to plain text mode
But I am trying with many other different way with no luck. Also doc did not help me with this, unfortunately.
My guess is both the settings have to be specified with the same function.
Thanks for any hint.
Bookmarks