New KTabWidget
Zack Rusin
zack at kde.org
Sun Mar 2 04:51:48 GMT 2003
On Saturday 01 March 2003 21:44, Jason Keirstead wrote:
> I would much like to use this widget in Kopete. Currently we have our
> own label color change methods, but if this was in QT or kdelibs it
> would be much nicer.
>
> I see you added these signals in QTabWidget:
> + void rightButtonClicked();
> + void leftButtonClicked();
>
> Shouldnt you pass the QWidget pointer of the tab you clicked on with
> these? (like, if you right click on the third tab, pass the pointer
> for that widget), Or at least the tab index? Any slots using these
> signals are usually going to need the tab they were fired on... see
> Konq code for example.
Thanks for taking the time to look at the patch.
The Konq code changed because I rewrote parts of it ;) So yes, I've seen
it, it's just that with this patch I wanted to address features that
just can't be implemented by subclassing QTabWidget, I only added the
coloring in it because it was such a widely requested feature, the rest
of it is implementing features which just can't be done with the
current widget. I can add to the patch user-friendly icon-changing and
contextMenu stuff without any problems if people think it makes sense
to have it right in QTabWidget ( personally, I think it does )
Oh, and the signals that you just mentioned shouldn't pass the widget of
the stack or the tab because they are emitted for the buttons on the
tab bar (in Konqueror I made the right one close the current tab and
the left one open a new one). The actions for those buttons are not
hardcoded in the widget so you can make it do whatever you want.
Zack
--
C.O.B.O.L - Completely Obsolete Boring Old Language.
More information about the kde-core-devel
mailing list