Commit f1634220 authored by Laurent Montel's avatar Laurent Montel 😁

Continue to implement preview page

parent 329f5a3e
......@@ -14,7 +14,7 @@ kcoreaddons_add_plugin(kmail_markdownplugin JSON kmail_markdownplugin.json SOURC
${kmail_markdownplugin_SRCS} INSTALL_NAMESPACE kmail)
target_link_libraries(kmail_markdownplugin
KF5::IconThemes KF5::MessageComposer KF5::I18n KF5::XmlGui
KF5::IconThemes KF5::MessageComposer KF5::I18n KF5::XmlGui Qt5::WebEngineWidgets
)
if(BUILD_TESTING)
......
......@@ -19,6 +19,7 @@
#include "markdownpreviewwidget.h"
#include <QHBoxLayout>
#include <QWebEngineView>
MarkdownPreviewWidget::MarkdownPreviewWidget(QWidget *parent)
: QWidget(parent)
......@@ -27,6 +28,11 @@ MarkdownPreviewWidget::MarkdownPreviewWidget(QWidget *parent)
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setMargin(0);
mWebView = new QWebEngineView(this);
mWebView->setObjectName(QStringLiteral("webengine"));
mainLayout->addWidget(mWebView);
mWebView->setContextMenuPolicy(Qt::NoContextMenu);
}
MarkdownPreviewWidget::~MarkdownPreviewWidget()
......
......@@ -21,13 +21,15 @@
#define MARKDOWNPREVIEWWIDGET_H
#include <QWidget>
class QWebEngineView;
class MarkdownPreviewWidget : public QWidget
{
Q_OBJECT
public:
explicit MarkdownPreviewWidget(QWidget *parent = nullptr);
~MarkdownPreviewWidget();
private:
QWebEngineView *mWebView = nullptr;
};
#endif // MARKDOWNPREVIEWWIDGET_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment