Solved How QPushButton checked show only border-bottom ?
-
The style border-bottom do not work.
And can set style to QButtonGroup ?setStyleSheet("QPushButton { font-size:20px; }" "QPushButton:checked { border-bottom:1px solid rgb(0,131,221); color:rgb(0,131,221); font-size:20px;}");
-
you must set checkable to true and then set border to none then set border-bottom like this:
ui->pushButton_2->setCheckable(true); ui->pushButton_2->setStyleSheet("QPushButton { font-size:20px; }" "QPushButton:checked { border:none;border-bottom:1px solid rgb(0,131,221); color:rgb(0,131,221); font-size:20px;}"); }
-
border:none and border-bottom must both have, so strange !
And use QTabWidget instead of QButtonGroup is much more better here.