From 9ec38341c07a65c0a01d7644ec53da19ce91fd46 Mon Sep 17 00:00:00 2001 From: gantners Date: Wed, 12 Feb 2020 01:17:21 +0100 Subject: [PATCH] Migration of QTWebkit to QTWebEngine --- gui/gui.pro | 28 ++-- gui/gui.pro.user | 393 +++++++++++++++++++++++++++++++++++---------- gui/main.cpp | 2 +- gui/mainwindow.cpp | 6 - gui/mainwindow.h | 4 +- gui/mainwindow.ui | 10 +- 6 files changed, 330 insertions(+), 113 deletions(-) diff --git a/gui/gui.pro b/gui/gui.pro index 1905e5f0..6895cf47 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -1,33 +1,31 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2019-07-26T12:28:54 -# -#------------------------------------------------- - -QT += core gui webkitwidgets xml +QT += core gui xml webenginewidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = gui -TEMPLATE = app +CONFIG += c++11 # The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings +# any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS -# You can also make your code fail to compile if you use deprecated APIs. +# You can also make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ - main.cpp \ - mainwindow.cpp + main.cpp \ + mainwindow.cpp HEADERS += \ - mainwindow.h + mainwindow.h FORMS += \ - mainwindow.ui + mainwindow.ui + +# 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/gui/gui.pro.user b/gui/gui.pro.user index 312d4811..77921f52 100644 --- a/gui/gui.pro.user +++ b/gui/gui.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {d371b588-db99-4f1e-a807-1bf323cf2ec5} + {df85c1a6-6b0e-4619-94f9-f10c93c31dbc} ProjectExplorer.Project.ActiveTarget @@ -54,24 +54,25 @@ ProjectExplorer.Project.PluginSettings - + + + true + ProjectExplorer.Project.Target.0 - Desktop - Desktop - {2edbc6df-7731-49e8-a28d-e1e359b84925} - 0 + Desktop Qt 5.11.0 GCC 64bit + Desktop Qt 5.11.0 GCC 64bit + qt.qt5.5110.gcc_64_kit + 1 0 0 - /media/michael/BigMemory/deepracer-for-dummies/build-gui-Desktop-Debug + /home/stefan/arc/deepracer-for-dummies/build-deepracer_gui-Desktop_Qt_5_11_0_GCC_64bit-Debug true - qmake - QtProjectManager.QMakeBuildStep true @@ -81,186 +82,411 @@ true - Make - Qt4ProjectManager.MakeStep - - -w - -r - + false + false 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep - - -w - -r - + true clean + false 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Debug - + Debug Qt4ProjectManager.Qt4BuildConfiguration 2 - true - /media/michael/BigMemory/deepracer-for-dummies/build-gui-Desktop-Release + /home/stefan/arc/deepracer-for-dummies/build-deepracer_gui-Desktop_Qt_5_11_0_GCC_64bit-Release true - qmake - QtProjectManager.QMakeBuildStep false false false - false + true true - Make - Qt4ProjectManager.MakeStep - - -w - -r - + false + false 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep - - -w - -r - + true clean + false 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Release - + Release Qt4ProjectManager.Qt4BuildConfiguration 0 - true - /media/michael/BigMemory/deepracer-for-dummies/build-gui-Desktop-Profile + /home/stefan/arc/deepracer-for-dummies/build-deepracer_gui-Desktop_Qt_5_11_0_GCC_64bit-Profile true - qmake - QtProjectManager.QMakeBuildStep true false true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + gui2 + Qt4ProjectManager.Qt4RunConfiguration:/home/stefan/repository/deepracer-for-dummies/gui/gui.pro + /home/stefan/repository/deepracer-for-dummies/gui/gui.pro + + false + + false + true + true + false + false + true + + /home/stefan/arc/deepracer-for-dummies/build-deepracer_gui-Desktop_Qt_5_11_0_GCC_64bit-Release + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.1 GCC 64bit + Desktop Qt 5.14.1 GCC 64bit + qt.qt5.5141.gcc_64_kit + 1 + 0 + 0 + + /home/stefan/arc/deepracer-for-dummies/build-deepracer_gui-Desktop_Qt_5_14_1_GCC_64bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false false true - Make - Qt4ProjectManager.MakeStep - - -w - -r - + false + false 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep - - -w - -r - + true clean + false 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Profile - + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + /home/stefan/arc/deepracer-for-dummies/build-deepracer_gui-Desktop_Qt_5_14_1_GCC_64bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + /home/stefan/arc/deepracer-for-dummies/build-deepracer_gui-Desktop_Qt_5_14_1_GCC_64bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile Qt4ProjectManager.Qt4BuildConfiguration 0 - true 3 0 Deploy - + Deploy ProjectExplorer.BuildSteps.Deploy 1 - Deploy locally - ProjectExplorer.DefaultDeployConfiguration 1 + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 false false 1000 @@ -275,6 +501,7 @@ 0.01 10 true + kcachegrind 1 25 @@ -302,35 +529,33 @@ 2 - gui - - Qt4ProjectManager.Qt4RunConfiguration:/media/michael/BigMemory/deepracer-for-dummies/gui/gui.pro - true - - gui.pro - false - - - 3768 + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + false true false false true + + 1 ProjectExplorer.Project.TargetCount - 1 + 2 ProjectExplorer.Project.Updater.FileVersion - 18 + 22 Version - 18 + 22 diff --git a/gui/main.cpp b/gui/main.cpp index e36d45d7..a887e1a7 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -1,4 +1,5 @@ #include "mainwindow.h" + #include int main(int argc, char *argv[]) @@ -6,6 +7,5 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); MainWindow w; w.showMaximized(); - return a.exec(); } diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index fab1d749..22a04ceb 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1,13 +1,7 @@ #include "mainwindow.h" #include "ui_mainwindow.h" -//sudo apt-get install libqt5svg5* -//sudo apt-get install jupyter -//If you need to reset QTCreator setting delete the folder ~/.local/QtProject or in ~/.config -//For development install the following //sudo apt-get install qtcreator -//sudo apt-get install qt5-default -//sudo apt-get install libqt5webkit5-dev MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), diff --git a/gui/mainwindow.h b/gui/mainwindow.h index a129e26c..7d925bd8 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -10,11 +10,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include diff --git a/gui/mainwindow.ui b/gui/mainwindow.ui index 2388b6ae..e22b30f1 100644 --- a/gui/mainwindow.ui +++ b/gui/mainwindow.ui @@ -176,14 +176,14 @@ - + 0 0 - + about:blank @@ -205,7 +205,7 @@ 0 0 1637 - 39 + 22 @@ -243,9 +243,9 @@ - QWebView + QWebEngineView QWidget -
QtWebKitWidgets/QWebView
+
QtWebEngineWidgets/QWebEngineView