<div dir="ltr">Hi!<br><div><div class="gmail_extra"><br></div><div class="gmail_extra">Before implementing setTabBarHidden(bool) and isTabBarHidden() from KTabWidget to QTabWidget, I have made a little program (you can find it attached, rename its extension to .tar.gz) to test whether these methods are really necessary.<br>
</div><div class="gmail_extra"><br><div class="gmail_quote">2013/3/24 David Faure <span dir="ltr"><<a href="mailto:faure@kde.org" target="_blank">faure@kde.org</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">On Sunday 24 March 2013 00:28:02 David Gil Oliva wrote:</div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">(...)<br>
</div><div class="im"><br>
> TODO: QTabWidget: give the possibility to hide the tabbar (used in many<br>
> places if count is 0). Preferably called setTabBarHidden(bool) /<br>
> isTabBarHidden() (then deprecate ktabwidget).<br>
<br>
</div>Hmm, having another look at the implementation of KTabWidget::setTabBarHidden,<br>
this method is really only tabBar()->setVisible(bool), plus showing/hiding<br>
corner widgets if any. But that means in the common case it's already just one<br>
method call. I thought this was about automatically hiding the tabbar if<br>
there's only 0 or 1 tabs, but apparently it's not, it's lower-level than that.<br>
<br>
OK in konqueror for instance there are two corner widgets (new tab and close<br>
tab), so there the convenience method is useful. Let's ask lxr.kde.org.... OK,<br>
same in akregator, kleopatra, ksystemlog, kdenlive. I guess that's enough<br>
arguments for getting it into Qt.<br>
<br>
Other apps, like krdc, powerdevil kcm, kftpgrabber, use the method, but don't<br>
have corner widgets, so tabBar()->setVisible(bool) would be enough.<br>
<br>
The reason I'm telling you all this is that it might be useful in the Qt<br>
review request, to convince Qt developers of the usefulness of the convenience<br>
method :)<br><span class=""><font color="#888888"><br>
<br>
</font></span></blockquote></div><br><div class="gmail_extra">The point is that it seems that the main 
purpose of setTabBarHidden(bool) is to get corner widgets also hidden. 
But corner widget also get hidden with 
QTabWidget::tabBar->hide(bool), as can be seen with the little program I've made, and therefore, as far as I can tell, 
the exact same result can be achieved with both methods.<br><br>This makes it 
much harder to defend the implementation of the  hiding-related KTabWidget 
methods into QTabWidget.<br><br></div><div class="gmail_extra">What do you think about it?<br><br></div><div class="gmail_extra">David Gil<br></div><a href="http://www.hackingastrology.net">www.hackingastrology.net</a></div>
</div></div>