[vlc-devel] An idea for partially modified QStyle

Jakob Leben jakob.leben at gmail.com
Wed Feb 10 10:58:58 CET 2010


modules/gui/qt4/components/playlist/selector.cpp:

/* I believe this is unnecessary, seeing
QStyle::SH_ItemView_ActivateItemOnSingleClick

    CONNECT( view, itemClicked( QTreeWidgetItem *, int ),
             this, setSource( QTreeWidgetItem *) );
*/

I found an interesting approach in KDE code: first you implement a handy
proxy subclass of QStyle that for every pure virtual in base class calls
implementation of widget's parent's or application's style() (if no parent)
- since style propagates from application or parent down. Then whenever you
need to have just partially modified QStyle, subclass the proxy and
reimplement only the desired function.
Maybe it comes handy one day...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100210/d18a6413/attachment.html>


More information about the vlc-devel mailing list