[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    KTabCtrl in libkdeui
From:       Matthias Ettrich <ettrich () troll ! no>
Date:       1999-11-03 1:04:43
[Download RAW message or body]

Hi,

KTabCtrl in libkdeui is a really nice class and was pretty important. It was a
big shortcoming of Qt not to have its own tabwidget but just a tab dialog.

But now Qt has a tab widget and (If I as co-author am allowed to say that) a
pretty good one. It's using QWidgetStack for the tabs, which now (thanks to its
usage in various wizard dialogs out there) does a pretty good job. It provides
reasonable focus handling when switching tabs, good layout management and nifty
small things like flicker-free tab changes. Furthermore it contains some code
to make it look reasonable good with different GUI styles (especially with
different frame sizes) or even as shaped widget. And it supports gimmicks like
iconsets on tabs....

To sum it up: QTabWidget, while providing the almost exactly same API as
KTabCtrl, is a little bit better. 

I suggest making KTabCtrl a subclass of QTabWidget, keeping its API completely.
It's almost identically anyway, but has for example a new signal
tabSelected(int). We can easily keep this signal and do a 

  connect( tabBar(), SIGNAL( selected(int) ), this, SIGNAL( tabSelected(int)));

in the new KTabCtrl's constructor. 

Opinions?

Matthias

BTW: for those not knowing  the class: we are talking 300 lines of code here.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic