PDA

View Full Version : QDesktopServices problem



jyoti
21st December 2006, 13:49
hi all
i am using Qt4.1.4
i am facing very small problem
i wanna open an external page
i had created code like this


void MainForm::openHelp()
{

QDesktopServices::openUrl(QUrl("http://www.google.com/"));
}

but its giving some errors

MainForm.cpp:21:27: error: QDesktopService: No such file or directory
MainForm.cpp: In member function 'void MainForm::openHelp()':
MainForm.cpp:81: error: 'QDesktopService' has not been declared
MainForm.cpp:81: error: 'openUrl' was not declared in this scope

Build failed (3 errors, 1 warning)

is there any alternative just like as QDesktopServices in QT4.1.4 otherwise tell how to open external link on QT4.1.4

plz do tell if as soon as possible ....

jpn
21st December 2006, 13:55
QDesktopServices class was introduced in Qt 4.2. There is no such class yet in 4.1.4.

wysota
21st December 2006, 13:59
is there any alternative just like as QDesktopServices in QT4.1.4 otherwise tell how to open external link on QT4.1.4

http://qds.berlios.de/ (I think it's for Qt3, but it'll probably also work with Qt4 - maybe just with minor adjustments).

BTW. We always answer questions as soon as possible.