diff options
author | flow <flowlnlnln@gmail.com> | 2022-08-02 15:17:54 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-10-08 14:11:20 -0300 |
commit | ea3be17220697326d3e508fc8c77d4e9bfbcf59f (patch) | |
tree | 877c989f248fdd9771b865a86721a173787ac3ae /launcher/ui/widgets/ProjectDescriptionPage.cpp | |
parent | 787234a53ad13844b73ff2d545b2f519af2f971b (diff) | |
download | PrismLauncher-ea3be17220697326d3e508fc8c77d4e9bfbcf59f.tar.gz PrismLauncher-ea3be17220697326d3e508fc8c77d4e9bfbcf59f.tar.bz2 PrismLauncher-ea3be17220697326d3e508fc8c77d4e9bfbcf59f.zip |
feat: add widget for a text browser with image support
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/widgets/ProjectDescriptionPage.cpp')
-rw-r--r-- | launcher/ui/widgets/ProjectDescriptionPage.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/launcher/ui/widgets/ProjectDescriptionPage.cpp b/launcher/ui/widgets/ProjectDescriptionPage.cpp new file mode 100644 index 00000000..2e6f6d97 --- /dev/null +++ b/launcher/ui/widgets/ProjectDescriptionPage.cpp @@ -0,0 +1,17 @@ +#include "ProjectDescriptionPage.h" + +#include "VariableSizedImageObject.h" + +#include <QDebug> + +ProjectDescriptionPage::ProjectDescriptionPage(QWidget* parent) : QTextBrowser(parent), m_image_text_object(new VariableSizedImageObject) +{ + m_image_text_object->setParent(this); + document()->documentLayout()->registerHandler(QTextFormat::ImageObject, m_image_text_object.get()); +} + +void ProjectDescriptionPage::setMetaEntry(QString entry) +{ + if (m_image_text_object) + m_image_text_object->setMetaEntry(entry); +} |