Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
GUI: fix webkit welcome tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
scamille committed Jul 19, 2018
1 parent bc5b6f7 commit a087f38
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions qt/sc_WelcomeTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@
SC_WelcomeTabWidget_WebKit::SC_WelcomeTabWidget_WebKit( SC_MainWindow* parent ) :
SC_WebEngineView( parent )
{
QString welcomeFile = SC_PATHS::getDataPath() + "/Welcome.html";
setUrl( "file:///" + welcomeFile );
for(const auto& path : SC_PATHS::getDataPaths())
{
QFile welcome_path(path + "/Welcome.html");
if (welcome_path.exists())
{
welcomeFile = welcome_path.fileName();
break;
}
}
welcome_uri = "file:///" + welcomeFile;
setUrl( welcome_uri );

page() -> setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
connect( this, SIGNAL( linkClicked( const QUrl& ) ), this, SLOT( linkClickedSlot( const QUrl& ) ) );
Expand Down

0 comments on commit a087f38

Please sign in to comment.