1-touch splitter wanted

Volker Augustin Volker.Augustin at stud.uni-regensburg.de
Mon Apr 29 10:24:22 BST 2002


> I tried twice and stopped with that. The QSplitter API hardly allows this.
> I mailed the Trolls ragrding this with some addtional questions, but
> apparently I lost the reply I got from them when KMail ate my inbox at the
> end of last year :(
> 
> I'm not sure if the qt-bugs list has online archives. If so, search for
> the subject 'Collapseable QSplitters?', that's my original mail and I did
> get a reply from the Trolls. I didn't follow-up on that due to the
> complixity and lack of time.

There does not seem to be an archive off the qt-bugs list. At least I 
couldn't find it.

<rant>
But I know what you mean with "The QSplitter API hardly allows this.". 
Trolltech seems to believe that it's best to make most data elements of a 
widget private. The only way to extend a Qt widget is normally to override 
the virtual functions provided by the API. Of course there are only such 
methods if Trolltech thought beforehand that it might be necessary to 
modify that behaviour.

The only way to work around that is to copy the complete class, and modify 
it directly. The drawbacks of this approach are:
a) you cannot use such a modified widget in places where an object of the 
orginial type is required
b) you have to integreate bugfixes to original class into your modified 
class manually which can be rather tedious (of course otherwise bugfixes 
might break your modification)

IMO a) is one of the most serious shortcomings of the Qt framework as it 
actually prevents you from doing things (maybe I just fail to see the 
workaround though).
</rant>

As the widget in cdbakeoven I mentioned only provides the 1-touch 
functionality but none of the other functionalities of QSplitter it cannot 
be used in most cases. So until Trolltech enhances the QSplitter themselves 
I don't see a way to do this.

Regards,
Volker Augustin




More information about the kde-core-devel mailing list