* News are passed as JSON string, containing an array of news items. * Each news item has version and content (html). * Items can be filtered by min/max version, OS and license. The first item that fits is used. * Items can be important, which highlights the news box. * News are not shown if older than 5 days. fortune cookie message = You will be financially successful in case your actions are well planned.
19 lines
410 B
C++
19 lines
410 B
C++
#include "QtTextEdit.h"
|
|
|
|
QtTextEdit::QtTextEdit(QWidget* parent)
|
|
: QTextBrowser(parent)
|
|
{
|
|
document()->setDefaultStyleSheet("a { color: #007AC2; }");
|
|
}
|
|
|
|
void QtTextEdit::setViewportMargins(int left, int top, int right, int bottom)
|
|
{
|
|
QAbstractScrollArea::setViewportMargins(left, top, right, bottom);
|
|
}
|
|
|
|
void QtTextEdit::focusInEvent(QFocusEvent* event)
|
|
{
|
|
emit focus();
|
|
QTextBrowser::focusInEvent(event);
|
|
}
|