本文整理汇总了Python中PyQt5.QtCore.QUrlQuery.queryItems方法的典型用法代码示例。如果您正苦于以下问题:Python QUrlQuery.queryItems方法的具体用法?Python QUrlQuery.queryItems怎么用?Python QUrlQuery.queryItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtCore.QUrlQuery
的用法示例。
在下文中一共展示了QUrlQuery.queryItems方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handle_form_submitted
# 需要导入模块: from PyQt5.QtCore import QUrlQuery [as 别名]
# 或者: from PyQt5.QtCore.QUrlQuery import queryItems [as 别名]
def handle_form_submitted(self, qurl, elements=dict()):
# print("\n\ngot url: ", qurl)
qqurl = QUrlQuery(qurl)
for key, value in qqurl.queryItems():
elements[key] = value
self.render(qurl.path(), elements)
示例2: link_clicked
# 需要导入模块: from PyQt5.QtCore import QUrlQuery [as 别名]
# 或者: from PyQt5.QtCore.QUrlQuery import queryItems [as 别名]
def link_clicked(self, qurl):
# print("link_clicked ->: ", qurl)
qqurl = QUrlQuery(qurl)
elements = {}
# print("got link_clicked url: ", qurl)
for key, value in qqurl.queryItems():
elements[key] = value
self.render(qurl.path(), elements)
示例3: wrapper
# 需要导入模块: from PyQt5.QtCore import QUrlQuery [as 别名]
# 或者: from PyQt5.QtCore.QUrlQuery import queryItems [as 别名]
def wrapper(SELF, request):
# Looking for Pid in query string, try matching with locally bound peerid
localPeerId = app.xwaredpy.peerId
if not localPeerId:
return request
urlQuery = QUrlQuery(request.url())
queryItems = dict(urlQuery.queryItems())
if queryItems.get("pid", None) != localPeerId:
return request
return func(SELF, request)
示例4: _preprocess_request_bind
# 需要导入模块: from PyQt5.QtCore import QUrlQuery [as 别名]
# 或者: from PyQt5.QtCore.QUrlQuery import queryItems [as 别名]
def _preprocess_request_bind(request):
# set boxName when binding the device to hostname
urlQuery = QUrlQuery(request.url())
queryItems = urlQuery.queryItems()
for i, item in enumerate(queryItems):
if item[0] == "boxName":
queryItems[i] = ("boxName", os.uname().nodename)
urlQuery.setQueryItems(queryItems)
# write changes back to request
qurl = request.url()
qurl.setQuery(urlQuery)
request.setUrl(qurl)
return request