PDA

View Full Version : how to open URL



timmu
23rd August 2009, 07:48
Hello!

What is the simplest possible code in Qt that could open a URL and check if it opened properly (if the website existed). Thanks!

tommy
23rd August 2009, 09:21
Make a slopt named testUrl and try this:



void MyWidget::testUrl()
{
QUrl myUrl("http://www.yahoo.com");
QDesktopServices::openUrl(myUrl);
}