#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDesktopServices>
#include <QUrl>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
QString link = "http://www.google.com";
QDesktopServices::openUrl(QUrl(link));
}
QT23 how to open a website in a default user browser
最新推荐文章于 2022-12-08 15:35:41 发布