mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
fix: inspect dialog
This commit is contained in:
parent
cce2cd6802
commit
563b1484fa
|
@ -13,13 +13,21 @@ ArticleInspector::ArticleInspector( QWidget * parent ) : QWidget( parent, Qt::Wi
|
||||||
viewContainer = new QWebEngineView( this );
|
viewContainer = new QWebEngineView( this );
|
||||||
v->addWidget( viewContainer );
|
v->addWidget( viewContainer );
|
||||||
|
|
||||||
|
setInspectPage( nullptr );
|
||||||
resize(800,600);
|
resize(800,600);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArticleInspector::setInspectPage( QWebEnginePage * page )
|
void ArticleInspector::setInspectPage( QWebEnginePage * page )
|
||||||
{
|
{
|
||||||
qDebug() << page->lifecycleState();
|
|
||||||
viewContainer->page()->setInspectedPage( page );
|
viewContainer->page()->setInspectedPage( page );
|
||||||
|
|
||||||
|
if( !page )
|
||||||
|
{
|
||||||
|
qDebug() << "set inspected page to nullptr";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << page->lifecycleState();
|
||||||
#if( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
|
#if( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
|
||||||
page->triggerAction( QWebEnginePage::InspectElement );
|
page->triggerAction( QWebEnginePage::InspectElement );
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue