This seems to work fine:
#include <QApplication>
#include <QLabel>
int main(int argc, char **argv){
label.setTextInteractionFlags(Qt::LinksAccessibleByMouse);
label.setOpenExternalLinks(true);
label.setText("<a href=\"http://www.qtcentre.org\">QtCentre</a>");
label.show();
return app.exec();
}
#include <QApplication>
#include <QLabel>
int main(int argc, char **argv){
QApplication app(argc, argv);
QLabel label;
label.setTextInteractionFlags(Qt::LinksAccessibleByMouse);
label.setOpenExternalLinks(true);
label.setText("<a href=\"http://www.qtcentre.org\">QtCentre</a>");
label.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Maybe the html code tags were changed into entities? Did you setup the text using Designer?
Bookmarks