Diffstat (limited to 'noncore/settings/appearance2/sample.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/appearance2/sample.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/noncore/settings/appearance2/sample.cpp b/noncore/settings/appearance2/sample.cpp index ee27d60..e447002 100644 --- a/noncore/settings/appearance2/sample.cpp +++ b/noncore/settings/appearance2/sample.cpp @@ -12,2 +12,3 @@ #include <qobjectlist.h> +#include <qcommonstyle.h> @@ -69,2 +70,3 @@ static void setStyleRecursive ( QWidget *w, QStyle *s ) { + w->setStyle( s ); QObjectList *childObjects=(QObjectList*)w->children(); @@ -78,3 +80,2 @@ static void setStyleRecursive ( QWidget *w, QStyle *s ) } - w->setStyle( s ); } @@ -84,2 +85,6 @@ void SampleWindow::setStyle2 ( QStyle *sty ) { + typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int, QMenuItem *, QColorGroup &, bool, bool); + + extern QDrawMenuBarItemImpl qt_set_draw_menu_bar_impl(QDrawMenuBarItemImpl); + QPixmapCache::clear ( ); @@ -87,3 +92,5 @@ void SampleWindow::setStyle2 ( QStyle *sty ) sty-> polish ( p ); + qt_set_draw_menu_bar_impl ( 0 ); setStyleRecursive ( this, sty ); + setPalette ( p ); QTimer::singleShot ( 0, this, SLOT( fixGeometry ( ))); @@ -208,2 +215,3 @@ void SampleWindow::paletteChange( const QPalette &old ) + void SampleWindow::setPalette ( const QPalette &pal ) @@ -213,3 +221,2 @@ void SampleWindow::setPalette ( const QPalette &pal ) style ( ). polish ( p ); - QWidget::setPalette ( p ); |