commit 85adf97b25974938de51fa4fe8a16cb42bc1ef06 Author: Jeena Date: Wed Nov 3 21:00:48 2021 +0900 initial commit diff --git a/.md b/.md new file mode 100644 index 0000000..6676762 --- /dev/null +++ b/.md @@ -0,0 +1 @@ +[?2004h[?1049h(B[?7h[?1h=[?1h=[?25l(B(B[ New File ](B(B GNU nano 5.9 READM (B (B^G(B Help(B^O(B Write Out(B^W(B Where Is(B^K(B Cut(B^T(B Execute(B^C(B Location(BM-U(B Undo(BM-A(B Set Mark(BM-](B To Bracket (BM-Q(B Previous(B^B(B Back(B^◂(B Prev Word(B^A(B Home (B^X(B Exit(B^R(B Read File(B^\(B Replace(B^U(B Paste(B^J(B Justify(B^/(B Go To Line (BM-E(B Redo(BM-6(B Copy(B^Q(B Where Was(BM-W(B Next(B^F(B Forward(B^▸(B Next Word(B^E(B End [?12l[?25h[?25l(B[ line 1/1 (100%), col 1/ 1 (100%), char 0/0 ( 0%) ](B [?12l[?25h[?25l [?12l[?25h[?25l[?12l[?25h[?25l(BModified(B [?12l[?25h[?25l(B[ line 2/2 (100%), col 1/ 1 (100%), char 1/1 (10(B [?12l[?25h[?25l [?12l[?25h[?25l [?12l[?25h[?25l [?12l[?25h[?25l[?12l[?25h[?25l[?12l[?25h[?25l[?12l[?25h[?25l[?12l[?25h[?25l[?12l[?25h[?25l.[?12l[?25h[?25l[?12l[?25h[?25l  (BM-F(B New Buffer  (B^S(B Spell Check (B^J(B Full Justify (B^V(B Cut Till End(BC(B Cancel  (BM-\(B Pipe Text   (B^Y(B Linter  (B^O(B Formatter   (B^Z(B Suspend (BCommand to execute: (B[?12l[?25h[?25l (B[ Cancelled ](B(B^O(B Write Out(B^W(B Where Is (B^K(B Cut (B^T(B Execute(B^C(B Location (BM-U(B Undo(BM-A(B Set Mark (BM-](B To Bracket (BM-Q(B Previous(B^B(B Back (B^◂(B Prev Word(B^A(B Home(BX(B Exit (B^R(B Read File(B^\(B Replace (B^U(B Paste(B^J(B Justify(B^/(B Go To Line (BM-E(B Redo(BM-6(B Copy (B^Q(B Where Was(BM-W(B Next(B^F(B Forward (B^▸(B Next Word(B^E(B End [?12l[?25h[?25l(B[ line 3/4 (75%), col 1/ 1 (100%), char 3/4 (75%) ](B [?12l[?25h[?25l [?12l[?25h[?1049l [?1l>[?2004l \ No newline at end of file diff --git a/JBrowser.pro b/JBrowser.pro new file mode 100644 index 0000000..5e7e906 --- /dev/null +++ b/JBrowser.pro @@ -0,0 +1,24 @@ +QT += quick +QT += webengine + +CONFIG += c++11 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp + +RESOURCES += qml.qrc main.html + +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = + +# Additional import path used to resolve QML modules just for Qt Quick Designer +QML_DESIGNER_IMPORT_PATH = + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/JBrowser.pro.user b/JBrowser.pro.user new file mode 100644 index 0000000..e56b9e7 --- /dev/null +++ b/JBrowser.pro.user @@ -0,0 +1,262 @@ + + + + + + EnvironmentId + {bfaa7e62-4f32-4919-9766-d100cb227d05} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + Builtin.BuildSystem + + true + true + Builtin.DefaultTidyAndClazy + 4 + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + Desktop + {09b5b305-45ee-4837-99d2-e372c644b0ec} + 0 + 0 + 0 + + 0 + /home/jeena/Projects/build-JBrowser-Desktop-Debug + /home/jeena/Projects/build-JBrowser-Desktop-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + /home/jeena/Projects/build-JBrowser-Desktop-Release + /home/jeena/Projects/build-JBrowser-Desktop-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + /home/jeena/Projects/build-JBrowser-Desktop-Profile + /home/jeena/Projects/build-JBrowser-Desktop-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:/home/jeena/Projects/JBrowser/JBrowser.pro + /home/jeena/Projects/JBrowser/JBrowser.pro + false + true + true + false + true + /home/jeena/Projects/build-JBrowser-Desktop-Debug + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/READM.save b/READM.save new file mode 100644 index 0000000..350e64e --- /dev/null +++ b/READM.save @@ -0,0 +1,3 @@ + +. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..9187ba4 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +JJBrowser error demo +==================== + +When I compile this project and run it, it should open a window and +show the content of a imbeded html page just saying "test". + +But it shows nothing. When you use loadHTML() then it works. diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..8e43fdd --- /dev/null +++ b/main.cpp @@ -0,0 +1,24 @@ +#include +#include +#include + +int main(int argc, char *argv[]) +{ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + QtWebEngine::initialize(); + + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + const QUrl url(QStringLiteral("qrc:/main.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(); +} diff --git a/main.html b/main.html new file mode 100644 index 0000000..9f1f2ca --- /dev/null +++ b/main.html @@ -0,0 +1,2 @@ + +

test

diff --git a/main.qml b/main.qml new file mode 100644 index 0000000..12ce3b5 --- /dev/null +++ b/main.qml @@ -0,0 +1,15 @@ +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtWebEngine 1.0 + +Window { + width: 640 + height: 480 + visible: true + title: qsTr("Hello World") + + WebEngineView { + anchors.fill: parent + url: "qrc:/main.html" + } +} diff --git a/qml.qrc b/qml.qrc new file mode 100644 index 0000000..1618891 --- /dev/null +++ b/qml.qrc @@ -0,0 +1,6 @@ + + + main.qml + main.html + +