Remove close icon on last QTabWidget
Solved
General and Desktop
-
I would provide a simple way to add and remove tabs from
QTabBar
. The first thought was to set a "plus" icon to the last tab and set the closeable property to true. When the use click on the last tab I insert a new one in the previous position. To remove one just click on the 'x' icon. It works, but it's not fine to have both plus and close icons on the last tab.Is there a way to hide the close icon only for the last tab?
It's ok the opposite: add a plus icon (or whatever) on the right of the last tab. -
Hi,
Would the corner widget using a button do the trick ?
-
Hi
Well if you insert new widget, it does hide the close button.
bar->setTabButton(1,QTabBar::ButtonPosition::RightSide,new QPushButton(bar) );