feat: add widget for a text browser with image support
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
24
launcher/ui/widgets/ProjectDescriptionPage.h
Normal file
24
launcher/ui/widgets/ProjectDescriptionPage.h
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user