
void Dialog::on_min_btn_clicked()
{
QWidget::showMinimized()
}
connect(m_HelpAct, SIGNAL(triggered()), this, SLOT(OnHelp()))实现槽函数:
void CXXX::OnHelp(){
QString runPath = QCoreApplication::applicationDirPath() //获取exe路劲。罩颤
QString helpName = "帮助文档.pdf"
QString helpPath = QString("%1/%2"肆戚).arg(runPath).arg(helpName)
QFile bfilePath(helpPath)
if(!bfilePath.exists()){
return
}
QString filePath = "file://物雹败/" + helpPath //打开文件夹用filse:///,打开网页用http://
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath))
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)