File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.20 )
22project (htmlscript)
33
44set (CMAKE_AUTOMOC ON )
55set (CMAKE_INCLUDE_CURRENT_DIR ON )
6+ set (CMAKE_CXX_STANDARD 23)
67
7- add_definitions (-std=gnu++14 )
8+ set (QT_VERSION 6 CACHE STRING "Major version of Qt to use (5 and 6 will work, anything else may or may not work)" )
89
9- find_package (Qt5 COMPONENTS Core Gui Widgets WebEngineWidgets REQUIRED)
10+ find_package (Qt ${QT_VERSION} COMPONENTS Core Gui Widgets WebEngineWidgets REQUIRED)
1011add_executable (htmlscript main.cpp Page.cpp)
11- qt5_use_modules (htmlscript Core Gui Widgets WebEngineWidgets)
12+ target_link_libraries (htmlscript Qt ${QT_VERSION} :: Core Qt ${QT_VERSION} :: Gui Qt ${QT_VERSION} :: Widgets Qt ${QT_VERSION} :: WebEngineWidgets)
1213
1314install (TARGETS htmlscript DESTINATION bin)
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ int main(int argc, char **argv) {
5252 startpage = fi.fileName ();
5353 }
5454
55- QWebEngineView *l=new QWebEngineView (0 );
55+ QWebEngineView *l=new QWebEngineView (static_cast <QWidget*>( nullptr ) );
5656 l->setWindowIcon (QIcon (cl.value (icon)));
5757 Page *p=new Page (dir, l);
5858 l->setPage (p);
You can’t perform that action at this time.
0 commit comments