Running Web pages or URL using QUrlOperator
The code is following;
#include<qapplication.h>
#include<qnetwork.h>
#include<qurloperator.h>
#include<qhttp.h>
int main( int argc, char ** argv )
{
QApplication a( argc, argv );
qInitNetworkProtocols();
QUrlOperator op( "http://www.trolltech.com" );
op.get( "index.html" );
a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
return a.exec();
}
It is not giving any error; but it is not displaying anything.
Help me please.
Anurag Shukla
Re: Running Web pages or URL using QUrlOperator
That's not gonna work. Q3UrlOperator::get just tries to download the file. It won't open it.
Do you want to open a web browser at that address? Then, in Qt 4 you have QDesktopServices::openUrl. It is static.
Regards
Re: Running Web pages or URL using QUrlOperator
Quote:
Originally Posted by
marcel
That's not gonna work. Q3UrlOperator::get just tries to download the file. It won't open it.
Do you want to open a web browser at that address? Then, in Qt 4 you have QDesktopServices::openUrl. It is static.
Regards
Dear Sir!
First I want to say thanks for sending response.
I want to open web information in Qt widgets. Is is possible. If posible plz. reply.
Re: Running Web pages or URL using QUrlOperator
You could do it with QTextEdit::setHtml, but it is limited.
You could download the file html and set it in the text edit. But again, there is no fully HTML compliant widget.
Regards
Re: Running Web pages or URL using QUrlOperator
What is the syntax for this?
I use Q3UrlOperator::get to download the file and how a way I set this content to QTextEdit.
I have no idea to do this.
There is no fully HTML compliant widget.
I cann't understand what u want to say.
Plz explain.
Re: Running Web pages or URL using QUrlOperator
After obtaining the data from the webpage, you have to display it on *something*. This could be a custom Widget or something ready made like QTextEdit or QTextBrowser. Unfortunately these provide limited html and CSS capabilities, so don't expect them to display a webpage, the way you are used to from firefox, ie or whatever webbrowser you use. Read the documentation of QTextBrowser and QTextEdit.
Re: Running Web pages or URL using QUrlOperator
Dear Sir!
Any way is possible to run firefox within QWidget hiding with its popups (hiding title bar, Menu Bar etc.).
Re: Running Web pages or URL using QUrlOperator
Quote:
Any way is possible to run firefox within QWidget hiding with its popups (hiding title bar, Menu Bar etc.).
No, forget about that.
You might be able to run IE like this, but this requires the ActiveX module.
Regards
Running Web pages or URL using MPlayer
Quote:
Originally Posted by
marcel
No, forget about that.
You might be able to run IE like this, but this requires the ActiveX module.
Regards
How a way I run url in MPlayer through Qt.
Re: Running Web pages or URL using MPlayer
Quote:
Originally Posted by
ashukla
How a way I run url in MPlayer through Qt.
Take a look at QProcess. Just instantiate a QProcess with mplayer as command name and the path,url as the argument ...
Re: Running Web pages or URL using QUrlOperator
Is MPlayer can open the any HTML web Pages or only the media URL contents.