feat: add widget for a text browser with image support

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-08-02 15:17:54 -03:00
parent 787234a53a
commit ea3be17220
5 changed files with 218 additions and 0 deletions

View File

@ -0,0 +1,24 @@
#pragma once
#include <QTextBrowser>
#include "QObjectPtr.h"
QT_BEGIN_NAMESPACE
class VariableSizedImageObject;
QT_END_NAMESPACE
/** This subclasses QTextBrowser to provide additional capabilities
* to it, like allowing for images to be shown.
*/
class ProjectDescriptionPage final : public QTextBrowser {
Q_OBJECT
public:
ProjectDescriptionPage(QWidget* parent = nullptr);
void setMetaEntry(QString entry);
private:
shared_qobject_ptr<VariableSizedImageObject> m_image_text_object;
};