Hi! 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.
2013/3/24 David Faure <fa...@kde.org> > On Sunday 24 March 2013 00:28:02 David Gil Oliva wrote: > > (...) > > > TODO: QTabWidget: give the possibility to hide the tabbar (used in many > > places if count is 0). Preferably called setTabBarHidden(bool) / > > isTabBarHidden() (then deprecate ktabwidget). > > Hmm, having another look at the implementation of > KTabWidget::setTabBarHidden, > this method is really only tabBar()->setVisible(bool), plus showing/hiding > corner widgets if any. But that means in the common case it's already just > one > method call. I thought this was about automatically hiding the tabbar if > there's only 0 or 1 tabs, but apparently it's not, it's lower-level than > that. > > OK in konqueror for instance there are two corner widgets (new tab and > close > tab), so there the convenience method is useful. Let's ask lxr.kde.org.... > OK, > same in akregator, kleopatra, ksystemlog, kdenlive. I guess that's enough > arguments for getting it into Qt. > > Other apps, like krdc, powerdevil kcm, kftpgrabber, use the method, but > don't > have corner widgets, so tabBar()->setVisible(bool) would be enough. > > The reason I'm telling you all this is that it might be useful in the Qt > review request, to convince Qt developers of the usefulness of the > convenience > method :) > > > 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. This makes it much harder to defend the implementation of the hiding-related KTabWidget methods into QTabWidget. What do you think about it? David Gil www.hackingastrology.net
hideTabBar.t
Description: Troff document
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel