opt: inspector

This commit is contained in:
Xiao YiFang 2022-08-19 19:56:49 +08:00
parent a205d22139
commit f542642c85
2 changed files with 8 additions and 3 deletions

View file

@ -1656,9 +1656,7 @@ ArticleView * MainWindow::createNewTab( bool switchToIt,
dictionaryBar.toggleViewAction(),
groupList );
connect( view, &ArticleView::inspectSignal,this,[this](QWebEnginePage * page){
inspector->setInspectPage( page );
});
connect( view, &ArticleView::inspectSignal,this,&MainWindow::inspectElement);
connect( view, SIGNAL( titleChanged( ArticleView *, QString const & ) ),
this, SLOT( titleChanged( ArticleView *, QString const & ) ) );
@ -1733,6 +1731,11 @@ ArticleView * MainWindow::createNewTab( bool switchToIt,
return view;
}
void MainWindow::inspectElement( QWebEnginePage * page )
{
inspector->setInspectPage( page );
}
void MainWindow::tabCloseRequested( int x )
{
QWidget * w = ui.tabWidget->widget( x );

View file

@ -489,6 +489,8 @@ private slots:
void clipboardChange( );
void inspectElement( QWebEnginePage * );
signals:
/// Set optional parts expand mode for all tabs
void setExpandOptionalParts( bool expand );