Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 1381cabc authored by Laurent Montel's avatar Laurent Montel 😁

Use page

parent 0dc3946e
......@@ -9,6 +9,6 @@ macro(add_kmail_converttext_unittest _source _additional)
endmacro ()
add_kmail_converttext_unittest(markdowninterfacetest.cpp "../markdowninterface.cpp")
add_kmail_converttext_unittest(markdownpreviewwidgettest.cpp "../markdownpreviewwidget.cpp;../markdowndocument.cpp")
add_kmail_converttext_unittest(markdownplugintest.cpp "../markdownplugin.cpp;../markdowninterface.cpp;../markdowndocument.cpp")
add_kmail_converttext_unittest(markdownpreviewwidgettest.cpp "../markdownpreviewwidget.cpp;../markdowndocument.cpp;../markdownpreviewpage.cpp")
add_kmail_converttext_unittest(markdownplugintest.cpp "../markdownplugin.cpp;../markdowninterface.cpp;../markdowndocument.cpp;../markdownpreviewpage.cpp")
add_kmail_converttext_unittest(markdowndocumenttest.cpp "../markdowndocument.cpp")
......@@ -19,13 +19,16 @@
#include "markdownpreviewwidget.h"
#include "markdowndocument.h"
#include "markdownpreviewpage.h"
#include <QHBoxLayout>
#include <QWebChannel>
#include <QWebEngineProfile>
#include <QWebEngineView>
MarkdownPreviewWidget::MarkdownPreviewWidget(QWidget *parent)
: QWidget(parent)
{
MarkdownPreviewPage *webenginePage = new MarkdownPreviewPage(new QWebEngineProfile(this), this);
mDocument = new MarkdownDocument(this);
mDocument->setObjectName(QStringLiteral("document"));
......@@ -34,6 +37,10 @@ MarkdownPreviewWidget::MarkdownPreviewWidget(QWidget *parent)
mainLayout->setMargin(0);
mWebView = new QWebEngineView(this);
mWebView->setPage(webenginePage);
//connect(webenginePage, &MarkdownPreviewPage::openUrlRequested, this, &QWebEngineView::openUrlRequested);
//connect(webenginePage, &MarkdownPreviewPage::linkHovered, this, &QWebEngineView::linkHovered);
mWebView->setObjectName(QStringLiteral("webengine"));
mainLayout->addWidget(mWebView);
mWebView->setContextMenuPolicy(Qt::NoContextMenu);
......
set(markdown_gui_SRCS main.cpp markdowndemowidget.cpp ../markdownpreviewwidget.cpp ../markdowndocument.cpp)
set(markdown_gui_SRCS main.cpp markdowndemowidget.cpp ../markdownpreviewwidget.cpp ../markdowndocument.cpp ../markdownpreviewpage.cpp)
add_executable(markdown_gui ${markdown_gui_SRCS})
target_link_libraries(markdown_gui
KF5::MessageComposer KF5::I18n KF5::XmlGui Qt5::WebEngineWidgets
......
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