#include <QLocale>
#include <QTextStream>
#include <QMessageBox>
-#include <QPalette>
-#include <QBrush>
-#include <QColor>
+
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() + ";}" );
}
<property name="windowTitle">
<string>Help</string>
</property>
- <layout class="QGridLayout" name="gridLayout">
+ <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
- <widget class="QTextBrowser" name="textBrowser">
- <property name="styleSheet">
- <string notr="true"/>
- </property>
+ <widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="widgetResizable">
+ <bool>true</bool>
</property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>522</width>
+ <height>407</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="textBrowser">
+ <property name="locale">
+ <locale language="English" country="UnitedStates"/>
+ </property>
+ <property name="text">
+ <string>Cannot open help file!</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
</layout>