hi
I wish to open a web browser in unix ( mozilla) from QT .
I saw that this question was asked here before and i used the answer in mu code .
BUT
it doesn't work for me. the process crash ( normalExit return 0 ) and no browser is open.
How can i figure out why it does not work ??
more details :
I am working on sun OS
which i am loged in using the rlogin command
the DISPLAY env is set correctlly in my ~/.cshrc file.
here is the code that i copy from this forum :
and what does Q_UNUSED(this) mean ?
bool result = false;
QUrl rUrl
("http://www.cnn.com");
Q_UNUSED(this);
// Try a range of browsers available on UNIX, until we (hopefully)
// find one that works. Start with the most popular first.
bool process_started = false;
process.
setArguments(QStringList() <<
"mozilla" << sUrl
);
process_started = process.start();
return;
bool result = false;
QUrl rUrl("http://www.cnn.com");
QString sUrl = rUrl;
QApplication::setOverrideCursor(Qt::BusyCursor);
Q_UNUSED(this);
// Try a range of browsers available on UNIX, until we (hopefully)
// find one that works. Start with the most popular first.
QProcess process;
bool process_started = false;
process.setArguments(QStringList() << "mozilla" << sUrl );
process_started = process.start();
QApplication::restoreOverrideCursor();
return;
To copy to clipboard, switch view to plain text mode
Bookmarks