// qt includes #include #include #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow* mainWin = new QMainWindow(); QWebEngineView* pView = new QWebEngineView(mainWin); _ASSERT(false && "Pre-WebEnginePage"); // asserts here (and anytime before)... auto pPage = pView->page(); _ASSERT(false && L"Post-WebEnginePage"); // ... but does not assert here (or hereafter) pPage->setUrl(QUrl("http://www.google.com")); // setup rest of the application and basic menu controls QMenu* pQFile = mainWin->menuBar()->addMenu(QIcon(), "&File"); mainWin->addAction(pQFile->addAction(QIcon(), "&Quit", qApp, SLOT(quit()), Qt::Key_Q)); mainWin->setCentralWidget(pView); mainWin->resize(1024, 750); mainWin->show(); auto result = app.exec(); // tidy up and quit delete pView; delete mainWin; _ASSERT(false && "Done"); // does not assert here either return result; }