Qt QPushButton(四) 在界面上跳转打开某网址

Qt QPushButton(四) 在界面上跳转打开某网址

在ui界面创建按钮,创建槽函数 ,点击触发。

QDesktopServices::openUrl(QUrl(QLatin1String("https://blog.csdn.net/qq_45646951")));

这样就可以实现跳转网页了,不止按钮,也可以QLine QLable等等 都可以触发。

猜你喜欢

转载自blog.csdn.net/qq_45646951/article/details/108821937
今日推荐