[SOLVED] How can I link to a website when an action is triggered
-
How can I link to a website when an action is triggered?
I know how to open external HTML pages making a label clickable but what I want is to have a link in the main drop down menu (File Edit View etc) that when triggered it points to an external website, basically an action pointing to an HTML help-page.
What would be the best way to do this?
Clickable label
@ui->label->setOpenExternalLinks(true);
ui->label->setText("<a >My Site</a>");@Thanks
-
connect your action to a slot like this:
@
void MySlot()
{
QDesktopServices::openUrl( QUrl("http://www.website.com") );
}
@