{"action":"created","issue":{"url":"https://api.github.com/repos/therecipe/qt/issues/730","repository_url":"https://api.github.com/repos/therecipe/qt","labels_url":"https://api.github.com/repos/therecipe/qt/issues/730/labels{/name}","comments_url":"https://api.github.com/repos/therecipe/qt/issues/730/comments","events_url":"https://api.github.com/repos/therecipe/qt/issues/730/events","html_url":"https://github.com/therecipe/qt/issues/730","id":378779249,"node_id":"MDU6SXNzdWUzNzg3NzkyNDk=","number":730,"title":"QWebEngineView triggerPageAction","user":{"login":"lexesv","id":15149258,"node_id":"MDQ6VXNlcjE1MTQ5MjU4","avatar_url":"https://avatars3.githubusercontent.com/u/15149258?v=4","gravatar_id":"","url":"https://api.github.com/users/lexesv","html_url":"https://github.com/lexesv","followers_url":"https://api.github.com/users/lexesv/followers","following_url":"https://api.github.com/users/lexesv/following{/other_user}","gists_url":"https://api.github.com/users/lexesv/gists{/gist_id}","starred_url":"https://api.github.com/users/lexesv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexesv/subscriptions","organizations_url":"https://api.github.com/users/lexesv/orgs","repos_url":"https://api.github.com/users/lexesv/repos","events_url":"https://api.github.com/users/lexesv/events{/privacy}","received_events_url":"https://api.github.com/users/lexesv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-08T15:20:46Z","updated_at":"2018-11-09T08:17:07Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI try implement this working C++ code to Go\r\n \r\n```c++\r\n    view = new QWebEngineView(this);\r\n    view->load(url);\r\n    view->setContextMenuPolicy(Qt::CustomContextMenu);\r\n    connect(view, &QWidget::customContextMenuRequested, this, [this]() {\r\n        QMenu* menu = new QMenu(this);\r\n        QAction* action_copy = menu->addAction(\"Copy\");\r\n        connect(action_copy, &QAction::triggered, this, [this](){\r\n            view->triggerPageAction(QWebEnginePage::Copy);\r\n        });\r\n        QAction* action_paste = menu->addAction(\"Paste\");\r\n        connect(action_paste, &QAction::triggered, this, [this](){\r\n            view->triggerPageAction(QWebEnginePage::Paste);\r\n        });\r\n        menu->exec(QCursor::pos());\r\n    });\r\n```\r\n\r\nIt not working:\r\n\r\n```go\r\nvar view = webengine.NewQWebEngineView(nil)\r\n\tview.SetContextMenuPolicy(core.Qt__CustomContextMenu)\r\n\tview.ConnectCustomContextMenuRequested(func(p *core.QPoint) {\r\n\t\tcontextMenu := widgets.NewQMenu(view)\r\n\t\tmenuActionCopy := contextMenu.AddAction(\"C&opy\")\r\n\t\tmenuActionCopy.ConnectTriggered(func(checked bool) {\r\n\t\t\t//app.Clipboard().SetText(view.SelectedText(), gui.QClipboard__Clipboard)\r\n\t\t\tview.Page().Action(webengine.QWebEnginePage__Copy)\r\n\t\t})\r\n\t\tmenuActionPaste := contextMenu.AddAction(\"P&aste\")\r\n\t\tmenuActionPaste.ConnectTriggered(func(checked bool) {\r\n\t\t\tview.Page().Action(webengine.QWebEnginePage__Paste)\r\n\t\t})\r\n\t\tcontextMenu.Exec()\r\n\t})\r\n```"},"comment":{"url":"https://api.github.com/repos/therecipe/qt/issues/comments/437283814","html_url":"https://github.com/therecipe/qt/issues/730#issuecomment-437283814","issue_url":"https://api.github.com/repos/therecipe/qt/issues/730","id":437283814,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzI4MzgxNA==","user":{"login":"lexesv","id":15149258,"node_id":"MDQ6VXNlcjE1MTQ5MjU4","avatar_url":"https://avatars3.githubusercontent.com/u/15149258?v=4","gravatar_id":"","url":"https://api.github.com/users/lexesv","html_url":"https://github.com/lexesv","followers_url":"https://api.github.com/users/lexesv/followers","following_url":"https://api.github.com/users/lexesv/following{/other_user}","gists_url":"https://api.github.com/users/lexesv/gists{/gist_id}","starred_url":"https://api.github.com/users/lexesv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexesv/subscriptions","organizations_url":"https://api.github.com/users/lexesv/orgs","repos_url":"https://api.github.com/users/lexesv/repos","events_url":"https://api.github.com/users/lexesv/events{/privacy}","received_events_url":"https://api.github.com/users/lexesv/received_events","type":"User","site_admin":false},"created_at":"2018-11-09T08:17:07Z","updated_at":"2018-11-09T08:17:07Z","author_association":"NONE","body":"Thank you very much.\r\n\r\nTell me, is this feature not implemented?\r\n```c++\r\nvoid ignoreCertificateError()\r\n```\r\nhttps://doc.qt.io/qt-5.11/qml-qtwebengine-webenginecertificateerror.html\r\n\r\nI try \r\n```c++\r\n//c++ \r\n// Ignore SSL Errors [Comment out before production]\r\n    QSslConfiguration sslConf = QSslConfiguration::defaultConfiguration();\r\n    sslConf.setPeerVerifyMode(QSslSocket::VerifyNone);\r\n    QSslConfiguration::setDefaultConfiguration(sslConf);\r\n```\r\n\r\n\r\n```go \r\n// go \r\nsslconf:= network.NewQSslConfiguration().DefaultConfiguration()\r\nsslconf.SetPeerVerifyMode(network.QSslSocket__VerifyNone)\r\nnetwork.NewQSslConfiguration().SetDefaultConfiguration(sslconf)\r\n```\r\nBut it does not work."}}
{"actor":{"display_login":"lexesv"}}