本文整理汇总了C++中QWebFrame::load方法的典型用法代码示例。如果您正苦于以下问题:C++ QWebFrame::load方法的具体用法?C++ QWebFrame::load怎么用?C++ QWebFrame::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWebFrame
的用法示例。
在下文中一共展示了QWebFrame::load方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void QWebFrameProto::load(const QNetworkRequest & req, QNetworkAccessManager::Operation operation, const QByteArray & body)
{
scriptDeprecated("QWebFrame will not be available in future versions");
QWebFrame *item = qscriptvalue_cast<QWebFrame*>(thisObject());
if (item)
item->load(req, operation, body);
}
示例2: reloadRequestWithoutDisposition
static void reloadRequestWithoutDisposition (QNetworkReply* reply)
{
QNetworkRequest req (reply->request());
req.setRawHeader("x-kdewebkit-ignore-disposition", "true");
QWebFrame* frame = qobject_cast<QWebFrame*> (req.originatingObject());
if (!frame)
return;
frame->load(req);
}
示例3: createWindow
Page* ChromeClientQt::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features)
{
QWebPage* newPage = m_webPage->createWindow(features.dialog ? QWebPage::WebModalDialog : QWebPage::WebBrowserWindow);
if (!newPage)
return 0;
// A call to QWebPage::mainFrame() implicitly creates the main frame.
// Make sure it exists, as WebCore expects it when returning from this call.
QWebFrame* mainFrame = newPage->mainFrame();
if (!request.isEmpty())
mainFrame->load(request.resourceRequest().url());
return newPage->d->page;
}
示例4: load
void WebCapture::load(const QUrl &url)
{
QWebFrame *frame = page_.mainFrame();
frame->load(url);
frame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
frame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
if (progress) {
progress->setValue(0);
if ( progress->isHidden())
progress->setVisible(true);
}
qDebug()<< frame->baseUrl();
qDebug()<< "loading start";
}
示例5: invoke
void LoadItem::invoke() const
{
//qDebug() << ">>>LoadItem::invoke";
Q_ASSERT(m_webPage);
QWebFrame *frame = 0;
const QString t = target();
if (t.isEmpty())
frame = m_webPage->mainFrame();
else
frame = findFrameNamed(t, m_webPage->mainFrame());
if (!frame)
return;
frame->load(url());
}