Skip to content

Commit

Permalink
fix:F12 crash on qt6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Mar 16, 2022
1 parent fa2aae9 commit eebe109
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions article_inspect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ void ArticleInspector::setInspectPage( QWebEnginePage * page )
{
this->inspectedPage = page;
page->setDevToolsPage( inspectView->page() );
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
//this line will crash application on qt6.2 ,see https://bugreports.qt.io/browse/QTBUG-101724
page->triggerAction( QWebEnginePage::InspectElement );
#endif
raise();
show();
}
Expand Down
2 changes: 0 additions & 2 deletions articlewebview.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
/// to the view's current state. This is used to open links in new tabs when
/// they are clicked with middle button. There's also an added possibility to
/// get double-click events after the fact with the doubleClicked() signal.
/// 2. Manage our own QWebInspector instance. In order to show inspector correctly,
/// use triggerPageAction( QWebEnginePage::InspectElement ) instead.
class ArticleWebView: public QWebEngineView
{
Q_OBJECT
Expand Down

0 comments on commit eebe109

Please sign in to comment.