PDA

View Full Version : QWebView



giusepped
14th January 2009, 08:39
I am trying to exand QWebView in order to open pop up pages.
So, I create a class like


#include "support.h"
#include <QWebView>

Support::Support(QWidget* parent) : QWebView(parent)
{
this->load(QUrl("http://re.jrc.ec.europa.eu/pvgis/apps3/pvest.php#"));
}


I know that I should use QWebView* Support::createWindow(QWebPage::WebWindowType type ), but I have no idea how to use it.
For example, who call that function and how use it?

Brandybuck
14th January 2009, 18:18
QWebView::load() is the correct method to load an URL. But I don't see you showing the widget. QWebView is a QWidget, and not a dialog, so you need to call show() or the equivalent before it will be displayed.

I put the QWebKit presentation uplast Sunday. It should give you a good headstart on using Webkit.
http://www.qtcentre.org/forum/f-qt-webkit-36/t-qwebkit-webcast-now-online-18040.html

giusepped
19th January 2009, 12:34
I do in the caller. Anyway, the problem is how to open popup page in new tab.
G

numen
18th March 2009, 05:32
see the demo browser with qt release