ShellExecute fails for local html or file URLs

前端 未结 4 523
一整个雨季
一整个雨季 2020-12-19 11:48

Our company is migrating our help systems over to HTML5 format under Flare. We\'ve also added Topic based access to the help systems using Flare CSHID\'s on the URI command

4条回答
  •  萌比男神i
    2020-12-19 11:59

    I solved the problem without using any method other than ShellExecute in a Qt Application

    QString currentpath = QDir::currentPath();
    QString url = "/help//html/index.html#current";
    QString full_url = "file:///" + currentpath + url;
    QByteArray full_url_arr= full_url.toLocal8Bit();
    LPCSTR lp = LPCSTR(full_url_arr.constData());
    ShellExecute(NULL, "open", lp, NULL, NULL, SW_SHOWNORMAL);
    
    

提交回复
热议问题