• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pageAction函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中pageAction函数的典型用法代码示例。如果您正苦于以下问题:C++ pageAction函数的具体用法?C++ pageAction怎么用?C++ pageAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了pageAction函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: page

void WebView::contextMenuEvent(QContextMenuEvent* event)
{
	if (isLoading_) return;
	QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
	QMenu *menu;

	if (!r.linkUrl().isEmpty()) {
		if (r.linkUrl().scheme() == "addnick") {
			event->ignore();
			return;
		}
		menu = URLObject::getInstance()->createPopupMenu(r.linkUrl().toEncoded());
		//menu->addAction(pageAction(QWebPage::CopyLinkToClipboard));
	} else {
		menu = new QMenu(this);
		if (!page()->selectedText().isEmpty()) {
			menu->addAction(pageAction(QWebPage::Copy));
		} else {
			if (!menu->isEmpty()) {
				menu->addSeparator();
			}
			menu->addAction(pageAction(QWebPage::SelectAll));
		}
		if (settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled)) {
			menu->addAction(pageAction(QWebPage::InspectElement));
		}
	}
	menu->addAction(pageAction(QWebPage::Reload));
	menu->exec(mapToGlobal(event->pos()));
	event->accept();
	delete menu;
}
开发者ID:akatov,项目名称:psi,代码行数:32,代码来源:webview.cpp


示例2: menu

//Page context menu
void AWebView::contextMenuEvent(QContextMenuEvent *event)
{
    QMenu menu(this);
    menu.addAction(pageAction(QWebPage::Back));
    menu.addAction(pageAction(QWebPage::Forward));
    menu.addAction(pageAction(QWebPage::Reload));
    menu.exec(mapToGlobal(event->pos()));
    return;
}
开发者ID:hechaoyuyu,项目名称:SetWallPaper,代码行数:10,代码来源:webview.cpp


示例3: pageAction

void SimplePartWidget::buildContextMenu(const QPoint &point, QMenu &menu) const
{
    menu.addAction(m_findAction);
    auto a = pageAction(QWebPage::Copy);
    a->setIcon(UiUtils::loadIcon(QStringLiteral("edit-copy")));
    menu.addAction(a);
    a = pageAction(QWebPage::SelectAll);
    a->setIcon(UiUtils::loadIcon(QStringLiteral("edit-select-all")));
    menu.addAction(a);
    if (!page()->mainFrame()->hitTestContent(point).linkUrl().isEmpty()) {
        menu.addSeparator();
        a = pageAction(QWebPage::CopyLinkToClipboard);
        a->setIcon(UiUtils::loadIcon(QStringLiteral("edit-copy")));
        menu.addAction(a);
    }
    menu.addSeparator();
    menu.addAction(m_savePart);
    menu.addAction(m_saveMessage);
    if (!page()->mainFrame()->hitTestContent(point).imageUrl().isEmpty()) {
        a = pageAction(QWebPage::DownloadImageToDisk);
        a->setIcon(UiUtils::loadIcon(QStringLiteral("download")));
        menu.addAction(a);
    }
    menu.addSeparator();
    QMenu *colorSchemeMenu = menu.addMenu(UiUtils::loadIcon(QStringLiteral("colorneg")), tr("Color scheme"));
    QActionGroup *ag = new QActionGroup(colorSchemeMenu);
    for (auto item: supportedColorSchemes()) {
        QAction *a = colorSchemeMenu->addAction(item.second);
        connect(a, &QAction::triggered, this, [this, item](){
           const_cast<SimplePartWidget*>(this)->setColorScheme(item.first);
        });
        a->setCheckable(true);
        if (item.first == m_colorScheme) {
            a->setChecked(true);
        }
        a->setActionGroup(ag);
    }

    auto zoomMenu = menu.addMenu(UiUtils::loadIcon(QStringLiteral("zoom")), tr("Zoom"));
    if (m_messageView) {
        zoomMenu->addAction(m_messageView->m_zoomIn);
        zoomMenu->addAction(m_messageView->m_zoomOut);
        zoomMenu->addAction(m_messageView->m_zoomOriginal);
    } else {
        auto zoomIn = zoomMenu->addAction(UiUtils::loadIcon(QStringLiteral("zoom-in")), tr("Zoom In"));
        zoomIn->setShortcut(QKeySequence::ZoomIn);
        connect(zoomIn, &QAction::triggered, this, &SimplePartWidget::zoomIn);

        auto zoomOut = zoomMenu->addAction(UiUtils::loadIcon(QStringLiteral("zoom-out")), tr("Zoom Out"));
        zoomOut->setShortcut(QKeySequence::ZoomOut);
        connect(zoomOut, &QAction::triggered, this, &SimplePartWidget::zoomOut);

        auto zoomOriginal = zoomMenu->addAction(UiUtils::loadIcon(QStringLiteral("zoom-original")), tr("Original Size"));
        connect(zoomOriginal, &QAction::triggered, this, &SimplePartWidget::zoomOriginal);
    }
}
开发者ID:KDE,项目名称:trojita,代码行数:56,代码来源:SimplePartWidget.cpp


示例4: copyAvailable

void HelpViewer::actionChanged()
{
    QAction *a = qobject_cast<QAction *>(sender());
    if (a == pageAction(QWebPage::Copy))
        emit copyAvailable(a->isEnabled());
    else if (a == pageAction(QWebPage::Back))
        emit backwardAvailable(a->isEnabled());
    else if (a == pageAction(QWebPage::Forward))
        emit forwardAvailable(a->isEnabled());
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:10,代码来源:helpviewer.cpp


示例5: backEnabled

void HelpWindowWidget::documentChanged()
{
    // A new help document has been selected, resulting in the previous or next
    // help document becoming either available or not

    QAction *action = qobject_cast<QAction *>(sender());

    if (action == pageAction(QWebPage::Back))
        emit backEnabled(action->isEnabled());
    else if (action == pageAction(QWebPage::Forward))
        emit forwardEnabled(action->isEnabled());
}
开发者ID:fethio,项目名称:opencor,代码行数:12,代码来源:helpwindowwidget.cpp


示例6: menu

void GlaucaWebView::contextMenuEvent(QContextMenuEvent *event){
	QWebHitTestResult result=page()->mainFrame()->hitTestContent(event->pos());
	QMenu menu(this);
	if(result.isContentSelected()){
		menu.addAction(pageAction(QWebPage::Copy));
		menu.addAction("Search \""+this->selectedText()+"\"",this,SIGNAL(searchRequest(this->selectedText())));
		menu.addAction("Add selected items to local wiki",this,SLOT(addSelectedToWiki()));
		menu.addSeparator();
	}
	if(!result.linkUrl().isEmpty()){
		menu.addAction("Open Link in new tab",this,SIGNAL(urlChanged(result.linkUrl())));
		menu.addAction(pageAction(QWebPage::DownloadLinkToDisk));
		menu.addAction(pageAction(QWebPage::CopyLinkToClipboard));
		menu.addSeparator();
	}
	if(!result.imageUrl().isEmpty()){
		menu.addAction(pageAction(QWebPage::CopyImageToClipboard));
		menu.addSeparator();
	}
	menu.addAction(pageAction(QWebPage::Back));
	menu.addAction(pageAction(QWebPage::Forward));
	menu.addAction(pageAction(QWebPage::Reload));
	menu.addAction(pageAction(QWebPage::Stop));
	menu.addSeparator();
	menu.addAction("Add page to local WIKI",this,SLOT(addPageToWiki()));
	menu.addAction("View Page Source",this,SLOT(viewPageSource()));
	menu.exec(mapToGlobal(event->pos()));
}
开发者ID:daiheitan,项目名称:glaucaBrowser,代码行数:28,代码来源:GlaucaWebView.cpp


示例7: contextMenu

void ChannelsView::contextMenu(QMenu *menu, const QWebHitTestResult &result)
{
  menu->addSeparator();

  const QUrl url = result.linkUrl();
  if (url.scheme() == LS("chat") && url.host() == LS("channel"))
    ChannelMenu::bind(menu, ChatUrls::channel(url), IChannelMenu::ChatViewScope);

  menu->addSeparator();

  if (!result.isContentEditable()) {
    menu->removeAction(pageAction(QWebPage::SelectAll));
    menu->addAction(pageAction(QWebPage::SelectAll));
  }
}
开发者ID:Artanomell,项目名称:schat,代码行数:15,代码来源:ChannelsView.cpp


示例8: pageAction

void AWebView::keyPressEvent (QKeyEvent* event)
{
	if (event->matches(QKeySequence::Copy) == true)
		pageAction(QWebPage::Copy)->trigger();
	else
		QWebView::keyPressEvent(event);
}
开发者ID:kan-izh,项目名称:avalon,代码行数:7,代码来源:web_view.cpp


示例9: QWebView

TinyWebBrowser::TinyWebBrowser( QWidget* parent )
    : QWebView( parent ),
      d( 0 )
{
    connect( this, SIGNAL(statusBarMessage(QString)),
             this, SIGNAL(statusMessage(QString)) );

    page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
    connect( this, SIGNAL(linkClicked(QUrl)),
             this, SLOT(openExternalLink(QUrl)) );
    connect( this, SIGNAL(titleChanged(QString)),
             this, SLOT(setWindowTitle(QString)) );

    pageAction( QWebPage::OpenLinkInNewWindow )->setEnabled( false );
    pageAction( QWebPage::OpenLinkInNewWindow )->setVisible( false );
}
开发者ID:calincru,项目名称:marble,代码行数:16,代码来源:TinyWebBrowser.cpp


示例10: pageAction

	void CustomWebView::keyReleaseEvent (QKeyEvent *event)
	{
		bool handled = false;
		if (event->matches (QKeySequence::Copy))
		{
			pageAction (QWebPage::Copy)->trigger ();
			/* TODO
			const QString& text = selectedText ();
			if (!text.isEmpty ())
			{
				QApplication::clipboard ()->setText (text,
						QClipboard::Clipboard);
				handled = true;
			}
			*/
		}
		else if (event->key () == Qt::Key_F6)
			Browser_->focusLineEdit ();
		else if (event->modifiers () == Qt::SHIFT &&
				(event->key () == Qt::Key_PageUp || event->key () == Qt::Key_PageDown))
		{
			ScrollDelta_ += event->key () == Qt::Key_PageUp ? -0.1 : 0.1;
			if (!ScrollTimer_->isActive ())
				ScrollTimer_->start (30);
		}
		else if (event->modifiers () == Qt::SHIFT &&
				event->key () == Qt::Key_Plus)
		{
			ScrollDelta_ = 0;
			ScrollTimer_->stop ();
		}

		if (!handled)
			QGraphicsWebView::keyReleaseEvent (event);
	}
开发者ID:Akon32,项目名称:leechcraft,代码行数:35,代码来源:customwebview.cpp


示例11: QAction

// ------------------------------------------
//  csWebView
// ------------------------------------------
csWebView::csWebView(QWidget *parent)
    :QWebView(parent)
{
    // ------------------------------
    // define additional actions
    // ------------------------------
    sendToClientAct = new QAction(tr("&Send to CGLX"), this);

    // ------------------------------
    // reproduce default context menu
    // for images on the web
    // ------------------------------
    connect(pageAction ( QWebPage::DownloadImageToDisk ),   SIGNAL(triggered()), this, SLOT(DownloadImg()));
    connect(pageAction ( QWebPage::OpenImageInNewWindow ),  SIGNAL(triggered()), this, SLOT(OpenImg()));
    connect(pageAction ( QWebPage::CopyImageToClipboard ),  SIGNAL(triggered()), this, SLOT(CopyImg()));
    connect(sendToClientAct,                                SIGNAL(triggered()), this, SLOT(SendToCGLX()));
}
开发者ID:calit2-kvl,项目名称:vr_connect,代码行数:20,代码来源:main.cpp


示例12: QWebView

HelpViewer::HelpViewer(QHelpEngine *engine, CentralWidget *parent)
    : QWebView(parent)
    , helpEngine(engine)
    , parentWidget(parent)
    , loadFinished(false)
{
    setAcceptDrops(false);

    setPage(new HelpPage(parent, helpEngine, this));

    page()->setNetworkAccessManager(new HelpNetworkAccessManager(engine, this));

    QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
    action->setText(tr("Open Link in New Tab"));
    if (!parent)
        action->setVisible(false);

    pageAction(QWebPage::DownloadLinkToDisk)->setVisible(false);
    pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
    pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);

    connect(pageAction(QWebPage::Copy), SIGNAL(changed()), this,
        SLOT(actionChanged()));
    connect(pageAction(QWebPage::Back), SIGNAL(changed()), this,
        SLOT(actionChanged()));
    connect(pageAction(QWebPage::Forward), SIGNAL(changed()), this,
        SLOT(actionChanged()));
    connect(page(), SIGNAL(linkHovered(QString,QString,QString)), this,
        SIGNAL(highlighted(QString)));
    connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
    connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:32,代码来源:helpviewer.cpp


示例13: setPage

void HelpBrowser::setHelpEngine(QHelpEngine* helpEngine)
{
  mpHelpEngine = helpEngine;

  setPage(new HelpPage((QWidget*)parent(), helpEngine, this));

  page()->setNetworkAccessManager(new HelpNetworkAccessManager(helpEngine, this));

  QAction* action = pageAction(QWebPage::OpenLinkInNewWindow);
  action->setText(tr("Open Link in New Tab"));
  if (!parent())
    action->setVisible(false);

  pageAction(QWebPage::DownloadLinkToDisk)->setVisible(false);
  pageAction(QWebPage::DownloadImageToDisk)->setVisible(false);
  pageAction(QWebPage::OpenImageInNewWindow)->setVisible(false);

}
开发者ID:sbmlteam,项目名称:QtDeviser,代码行数:18,代码来源:helpbrowser.cpp


示例14: pageAction

void lmcMessageLog::createContextMenu(void) {
	QAction* action = pageAction(QWebPage::Copy);
	action->setShortcut(QKeySequence::Copy);
	addAction(action);
	action = pageAction(QWebPage::CopyLinkToClipboard);
	addAction(action);
	action = pageAction(QWebPage::SelectAll);
	action->setShortcut(QKeySequence::SelectAll);
	addAction(action);

	contextMenu = new QMenu(this);
	copyAction = contextMenu->addAction("&Copy", this, SLOT(copyAction_triggered()), QKeySequence::Copy);
	copyLinkAction = contextMenu->addAction("&Copy Link", this, SLOT(copyLinkAction_triggered()));
	contextMenu->addSeparator();
	selectAllAction = contextMenu->addAction("Select &All", this,
							SLOT(selectAllAction_triggered()), QKeySequence::SelectAll);
	connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
	setContextMenuPolicy(Qt::CustomContextMenu);
}
开发者ID:j2doll,项目名称:lmc-clone,代码行数:19,代码来源:messagelog.cpp


示例15: QT_VERSION_CHECK

void WebView::contextMenuEvent(QContextMenuEvent* event)
{
	if (isLoading_) return;
#ifdef WEBENGINE
#if QT_VERSION >= QT_VERSION_CHECK(5,7,0)
	QWebEngineContextMenuData r = page()->contextMenuData();
#else
	struct CMData {
		QUrl linkUrl() { return QUrl(); } // just a stub. TODO invent something
	};
	CMData r;
#endif
#else
	QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());
#endif
	QMenu *menu;

	if (!r.linkUrl().isEmpty()) {
		if (r.linkUrl().scheme() == "addnick") {
			event->ignore();
			return;
		}
		menu = URLObject::getInstance()->createPopupMenu(r.linkUrl().toEncoded());
		//menu->addAction(pageAction(QWebPage::CopyLinkToClipboard));
	} else {
		menu = new QMenu(this);
		if (!page()->selectedText().isEmpty()) {
#ifdef WEBENGINE
			menu->addAction(pageAction(QWebEnginePage::Copy));
		} else {
			if (!menu->isEmpty()) {
				menu->addSeparator();
			}
			menu->addAction(pageAction(QWebEnginePage::SelectAll));
		}
		menu->addAction(pageAction(QWebEnginePage::InspectElement));
	}
	menu->addAction(pageAction(QWebEnginePage::Reload));
#else
			menu->addAction(pageAction(QWebPage::Copy));
		} else {
开发者ID:lyn1337,项目名称:PsiStorm,代码行数:41,代码来源:webview.cpp


示例16: page

void WebView::contextMenuEvent ( QContextMenuEvent * event )
{
    QMenu menu;

    QPoint pos = event->pos();

    QWebHitTestResult hitTest = page()->mainFrame()->hitTestContent( pos );

    if (!hitTest.linkElement().isNull()) {
        menu.addAction( pageAction(QWebPage::CopyLinkToClipboard) );
        menu.addSeparator();
    }

    if (hitTest.isContentEditable() || hitTest.isContentSelected()) {
        menu.addAction( pageAction(QWebPage::Copy) );
        if (hitTest.isContentEditable())
            menu.addAction( pageAction(QWebPage::Paste) );
        menu.addSeparator();
    }

    menu.addAction( pageAction(QWebPage::Back) );
    menu.addAction( pageAction(QWebPage::Forward) );
    menu.addAction( pageAction(QWebPage::Reload) );

    menu.exec( event->globalPos() );
}
开发者ID:DSastre,项目名称:supercollider,代码行数:26,代码来源:QcWebView.cpp


示例17: tr

void ChatView::contextMenu(QMenu *menu, const QWebHitTestResult &result)
{
  menu->addSeparator();

  const QUrl url = result.linkUrl();
  if (url.scheme() == LS("chat") && url.host() == LS("channel"))
    Hooks::ChannelMenu::bind(menu, ChatUrls::channel(url), Hooks::ChatViewScope);
  else
    Hooks::ChannelMenu::bind(menu, ChatClient::channels()->get(m_id), Hooks::ChatViewScope);

  menu->addSeparator();
  QMenu *display = menu->addMenu(SCHAT_ICON(Gear), tr("Display"));
  display->addAction(m_seconds);
  display->addAction(m_service);
  developerMenu(display);
  display->removeAction(pageAction(QWebPage::Reload));

  menu->addAction(m_autoscroll);
  menu->addSeparator();

  ClientChannel channel = ChatClient::channels()->get(id());
  if (channel && channel->data().value(LS("page")) == 1)
    menu->addAction(m_reload);
  else
    menu->addAction(m_clear);

  if (!result.isContentEditable()) {
    menu->removeAction(pageAction(QWebPage::SelectAll));
    menu->addAction(pageAction(QWebPage::SelectAll));
  }

  menu->removeAction(pageAction(QWebPage::Reload));
  menu->removeAction(pageAction(QWebPage::InspectElement));

  connect(menu, SIGNAL(triggered(QAction*)), SLOT(menuTriggered(QAction*)));

  ChatViewHooks::contextMenu(this, menu, result);
}
开发者ID:youngdev,项目名称:schat,代码行数:38,代码来源:ChatView.cpp


示例18: mHelpEngine

HelpWindowWidget::HelpWindowWidget(QHelpEngine *pHelpEngine,
                                   const QUrl &pHomePage, QWidget *pParent) :
    OpenCOR::WebViewerWidget::WebViewerWidget(pParent),
    Core::CommonWidget(),
    mHelpEngine(pHelpEngine),
    mHomePage(pHomePage),
    mZoomLevel(-1)   // This will ensure that mZoomLevel gets initialised by our
                     // first call to setZoomLevel
{
    // Use our own help page and help network access manager classes

    setPage(new HelpWindowPage(this));

    page()->setNetworkAccessManager(new HelpWindowNetworkAccessManager(pHelpEngine, this));

    // Set our initial zoom level to the default value
    // Note: to set mZoomLevel directly is not good enough since one of the
    //       things setZoomLevel does is to set our zoom factor...

    setZoomLevel(DefaultZoomLevel);

    // Some connections

    connect(this, SIGNAL(urlChanged(const QUrl &)),
            this, SLOT(urlChanged(const QUrl &)));

    connect(page(), SIGNAL(selectionChanged()),
            this, SLOT(selectionChanged()));

    connect(pageAction(QWebPage::Back), SIGNAL(changed()),
            this, SLOT(documentChanged()));
    connect(pageAction(QWebPage::Forward), SIGNAL(changed()),
            this, SLOT(documentChanged()));

    // Go to the home page

    goToHomePage();
}
开发者ID:fethio,项目名称:opencor,代码行数:38,代码来源:helpwindowwidget.cpp


示例19: QMenu

void WebView::contextMenuEvent(QContextMenuEvent *event)
{
    QMenu *menu = new QMenu(this);
    QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());

    if (!r.linkUrl().isEmpty()) {
         qDebug() << "Normal Click";
        menu->addAction(pageAction(QWebPage::OpenLinkInNewWindow));
        menu->addAction(tr("Open in New Tab"), this, SLOT(openLinkInNewTab()));
        menu->addSeparator();
        menu->addAction(pageAction(QWebPage::DownloadLinkToDisk));
        // Add link to bookmarks...
        menu->addSeparator();
        menu->addAction(pageAction(QWebPage::CopyLinkToClipboard));
        menu->addAction(tr("Block Image"), this, SLOT(blockImage()))->setData(r.imageUrl().toString());
        if (page()->settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled))
            menu->addAction(pageAction(QWebPage::InspectElement));
        menu->exec(mapToGlobal(event->pos()));
        return;
    }
    delete menu;
    QWebView::contextMenuEvent(event);
}
开发者ID:mannerdev,项目名称:zeus-browser,代码行数:23,代码来源:webview.cpp


示例20: QMenu

void WebView::contextMenuEvent(QContextMenuEvent *event)
{
    QMenu *menu = new QMenu(this);

    QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos());

    if (!r.linkUrl().isEmpty()) {
        menu->addAction(tr("Open in New &Window"), this, SLOT(openLinkInNewWindow()));
        menu->addAction(tr("Open in New &Tab"), this, SLOT(openLinkInNewTab()));
        menu->addSeparator();
        menu->addAction(tr("Save Lin&k"), this, SLOT(downloadLinkToDisk()));
        menu->addAction(tr("&Bookmark This Link"), this, SLOT(bookmarkLink()))->setData(r.linkUrl().toString());
        menu->addSeparator();
        menu->addAction(tr("&Copy Link Location"), this, SLOT(copyLinkToClipboard()));
        if (page()->settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled))
            menu->addAction(pageAction(QWebPage::InspectElement));
    }

    if (!r.imageUrl().isEmpty()) {
        if (!menu->isEmpty())
            menu->addSeparator();
        menu->addAction(tr("Open Image in New &Window"), this, SLOT(openImageInNewWindow()));
        menu->addAction(tr("Open Image in New &Tab"), this, SLOT(openImageInNewTab()));
        menu->addSeparator();
        menu->addAction(tr("&Save Image"), this, SLOT(downloadImageToDisk()));
        menu->addAction(tr("&Copy Image"), this, SLOT(copyImageToClipboard()));
        menu->addAction(tr("C&opy Image Location"), this, SLOT(copyImageLocationToClipboard()))->setData(r.imageUrl().toString());
    }

#ifdef WEBKIT_TRUNK // i.e. Qt 4.5, but not in Qt 4.5 yet
    if (menu->isEmpty())
        menu = page()->createStandardContextMenu();
#endif

    if (!menu->isEmpty()) {
        if (m_page->mainWindow()->menuBar()->isHidden()) {
            menu->addSeparator();
            menu->addAction(m_page->mainWindow()->showMenuBarAction());
        }

        menu->exec(mapToGlobal(event->pos()));
        delete menu;
        return;
    }
    delete menu;

    QWebView::contextMenuEvent(event);
}
开发者ID:ariya,项目名称:arora,代码行数:48,代码来源:webview.cpp



注:本文中的pageAction函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ page_address函数代码示例发布时间:2022-05-30
下一篇:
C++ page2pa函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap