* 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.
24 lines
348 B
C++
24 lines
348 B
C++
#ifndef QT_TEXT_EDIT_H
|
|
#define QT_TEXT_EDIT_H
|
|
|
|
#include <QTextBrowser>
|
|
|
|
class QtTextEdit
|
|
: public QTextBrowser
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QtTextEdit(QWidget* parent = nullptr);
|
|
|
|
void setViewportMargins(int left, int top, int right, int bottom);
|
|
|
|
signals:
|
|
void focus();
|
|
|
|
protected:
|
|
void focusInEvent(QFocusEvent* event);
|
|
};
|
|
|
|
#endif // QT_TEXT_EDIT_H
|