当前位置: 首页>>代码示例>>Python>>正文


Python QNetworkAccessManager.__init__方法代码示例

本文整理汇总了Python中PyQt5.QtNetwork.QNetworkAccessManager.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QNetworkAccessManager.__init__方法的具体用法?Python QNetworkAccessManager.__init__怎么用?Python QNetworkAccessManager.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.QtNetwork.QNetworkAccessManager的用法示例。


在下文中一共展示了QNetworkAccessManager.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PyQt5.QtNetwork import QNetworkAccessManager [as 别名]
# 或者: from PyQt5.QtNetwork.QNetworkAccessManager import __init__ [as 别名]
    def __init__(self):
        QNetworkAccessManager.__init__(self)
        url = QUrl("http://localhost:8085/events")
        req = QNetworkRequest(url)
        self.reply = self.get(req)

        self.reply.readyRead.connect(self.on_read_data)
        self.reply.finished.connect(self.on_finished)
        self.reply.error.connect(self.on_error)
开发者ID:devos50,项目名称:TriblerGUI,代码行数:11,代码来源:event_request_manager.py

示例2: __init__

# 需要导入模块: from PyQt5.QtNetwork import QNetworkAccessManager [as 别名]
# 或者: from PyQt5.QtNetwork.QNetworkAccessManager import __init__ [as 别名]
 def __init__(self):
     QNetworkAccessManager.__init__(self)
     self.dispatch_map = {
         'GET': self.perform_get,
         'PATCH': self.perform_patch,
         'PUT': self.perform_put,
         'DELETE': self.perform_delete,
         'POST': self.perform_post
     }
     self.protocol = DEFAULT_API_PROTOCOL
     self.host = DEFAULT_API_HOST
     self.port = DEFAULT_API_PORT
开发者ID:synctext,项目名称:tribler,代码行数:14,代码来源:tribler_request_manager.py

示例3: __init__

# 需要导入模块: from PyQt5.QtNetwork import QNetworkAccessManager [as 别名]
# 或者: from PyQt5.QtNetwork.QNetworkAccessManager import __init__ [as 别名]
 def __init__(self, api_port):
     QNetworkAccessManager.__init__(self)
     url = QUrl("http://localhost:%d/events" % api_port)
     self.request = QNetworkRequest(url)
     self.failed_attempts = 0
     self.connect_timer = QTimer()
     self.current_event_string = ""
     self.tribler_version = "Unknown"
     self.reply = None
     self.emitted_tribler_started = False  # We should only emit tribler_started once
     self.shutting_down = False
     self._logger = logging.getLogger('TriblerGUI')
开发者ID:Tribler,项目名称:tribler,代码行数:14,代码来源:event_request_manager.py

示例4: __init__

# 需要导入模块: from PyQt5.QtNetwork import QNetworkAccessManager [as 别名]
# 或者: from PyQt5.QtNetwork.QNetworkAccessManager import __init__ [as 别名]
 def __init__(self, parent=None):
     QNetworkAccessManager.__init__(self, parent)
     self._dispatcher = {}
     self.headers = {}
开发者ID:19joho66,项目名称:frescobaldi,代码行数:6,代码来源:networkaccessmanager.py

示例5: __init__

# 需要导入模块: from PyQt5.QtNetwork import QNetworkAccessManager [as 别名]
# 或者: from PyQt5.QtNetwork.QNetworkAccessManager import __init__ [as 别名]
 def __init__(self, parent = None):
     QNetworkAccessManager.__init__(self, parent)
开发者ID:892768447,项目名称:BlogClient,代码行数:4,代码来源:httputils.py


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