Hello anyone,
I have Qt-4.2.2 installed.
I have in a MainWindow a Label called searchLabel.
In Qt-4.2 there is a new signal LinkActivated();
I want to click on the searchLabel to start a another application for example a Dialog.
In my MainWindow i have the connection:
connect(searchLabel,
SIGNAL(linkActivated
(const QString &)),
this,
SLOT(search
()));
void MainWindow::search()
{
searchDialog dlg(this);
if( dlg.
exec() == QDialog::Accepted ) { }
}
connect(searchLabel, SIGNAL(linkActivated(const QString &)), this, SLOT(search()));
void MainWindow::search()
{
searchDialog dlg(this);
if( dlg.exec() == QDialog::Accepted ) {
}
}
To copy to clipboard, switch view to plain text mode
Normally in the docs the signal is:
connect(label_2, SIGNAL(linkActivated(const QString & )), this, SLOT(myslot(const QString &)));
In my Qt-Designer the flag Qt::LinksAccessibleByMouse is set.
Nothing happens, no errors in my console.
Can i use the signal LinkActivated() only for a URL adress?.
Thanks in advance.
Bookmarks