From 4f8823f0e44074cd7cac236106802caff6606b8f Mon Sep 17 00:00:00 2001 From: Daniel Klaffenbach Date: Wed, 17 Nov 2010 00:47:09 +0100 Subject: [PATCH] Display scrollbar in helpwindow For some reason a QTextBrowser formatted with a stylesheet does not display scrollbars on Maemo 5 with Qt 4.6/Qt 4.7. To work around this limitation the helpwindow was modified to consist of a QScrollArea containing a QLabel - this also eliminates the need for stylesheets. --- src/helpwindow.cpp | 14 +------------- src/helpwindow.ui | 39 ++++++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/helpwindow.cpp b/src/helpwindow.cpp index d6ab84a..79da304 100644 --- a/src/helpwindow.cpp +++ b/src/helpwindow.cpp @@ -23,27 +23,15 @@ #include #include #include -#include -#include -#include + HelpWindow::HelpWindow(QWidget *parent) : QWidget(parent), ui(new Ui::HelpWindow) { - //this is a stacked window on Maemo 5 - #if defined(Q_WS_MAEMO_5) - //setAttribute(Qt::WA_Maemo5StackedWindow); - #endif ui->setupUi(this); setHelpText(); - - //format color of help text according to system color scheme - QPalette palette; - QBrush brush = palette.windowText(); - QColor color = brush.color(); - ui->textBrowser->setStyleSheet( "QTextEdit {background: transparent; color: " + color.name() + ";}" ); } diff --git a/src/helpwindow.ui b/src/helpwindow.ui index 3619ded..9516cc1 100644 --- a/src/helpwindow.ui +++ b/src/helpwindow.ui @@ -13,18 +13,43 @@ Help - + - - - - + QFrame::NoFrame - - Qt::ScrollBarAlwaysOff + + QFrame::Plain + + + true + + + + 0 + 0 + 522 + 407 + + + + + + + + + + Cannot open help file! + + + true + + + + + -- 1.7.9.5