-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make qmarkdowntextedit static... Update build.yml Update build.yml Link to Qml `qmlplugin`: Link to Qml Try to fix build MAKE IT WORK!!!!! Remove old file Revert workflow changes Remove old file, sync qmarkdowntextedit.cpp/h with upstream Dont't force static Add missing `highlightingEnabled` - function Move qml stuff into seperate folder, make Quick dependency optional Add missing file Don't force Qt6, might work with Qt5 Made it work with Qt 5.12 Fix build if Qt Quick is not installed Remove unneeded include Remove old code Add missing `highlightingEnabled` - function Co-authored-by: Tim Gromeyer <tim.gromeyer@gmail.com>
- Loading branch information
1 parent
39da927
commit bb3bcd3
Showing
5 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <QApplication> | ||
#include <QQmlApplicationEngine> | ||
|
||
#include "markdownhighlighter.h" | ||
|
||
int main(int argc, char *argv[]) { | ||
QApplication app(argc, argv); | ||
|
||
qmlRegisterType<MarkdownHighlighter>("MarkdownHighlighter", 1, 0, | ||
"MarkdownHighlighter"); | ||
|
||
QQmlApplicationEngine engine; | ||
|
||
const QUrl url(QStringLiteral("qrc:/example.qml")); | ||
QObject::connect( | ||
&engine, &QQmlApplicationEngine::objectCreated, &app, | ||
[url](QObject *obj, const QUrl &objUrl) { | ||
if (!obj && url == objUrl) QCoreApplication::exit(-1); | ||
}, | ||
Qt::QueuedConnection); | ||
engine.load(url); | ||
|
||
return app.exec(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import QtQuick 2.0 | ||
import QtQuick.Window 2.0 | ||
import MarkdownHighlighter 1.0 | ||
|
||
Window { | ||
id: mainwindow | ||
width: 640 | ||
height: 400 | ||
visible: true | ||
title: qsTr("QtQuick Project") | ||
|
||
TextEdit { | ||
id: editor | ||
text: "# Hello world!" | ||
focus: true | ||
} | ||
|
||
MarkdownHighlighter { | ||
id: syntaxHighlighter | ||
textDocument: editor.textDocument | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<RCC> | ||
<qresource prefix="/"> | ||
<file>example.qml</file> | ||
</qresource> | ||
</RCC> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters