久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='XPDGY'><tr id='XPDGY'><dt id='XPDGY'><q id='XPDGY'><span id='XPDGY'><b id='XPDGY'><form id='XPDGY'><ins id='XPDGY'></ins><ul id='XPDGY'></ul><sub id='XPDGY'></sub></form><legend id='XPDGY'></legend><bdo id='XPDGY'><pre id='XPDGY'><center id='XPDGY'></center></pre></bdo></b><th id='XPDGY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XPDGY'><tfoot id='XPDGY'></tfoot><dl id='XPDGY'><fieldset id='XPDGY'></fieldset></dl></div>
    <legend id='XPDGY'><style id='XPDGY'><dir id='XPDGY'><q id='XPDGY'></q></dir></style></legend>

      • <bdo id='XPDGY'></bdo><ul id='XPDGY'></ul>

      <small id='XPDGY'></small><noframes id='XPDGY'>

        <tfoot id='XPDGY'></tfoot>

        如何將 QWebEngineProfile 設(shè)置為 QWebEngineView

        How to set a QWebEngineProfile to a QWebEngineView(如何將 QWebEngineProfile 設(shè)置為 QWebEngineView)

            <tfoot id='Qsrmt'></tfoot>
              <i id='Qsrmt'><tr id='Qsrmt'><dt id='Qsrmt'><q id='Qsrmt'><span id='Qsrmt'><b id='Qsrmt'><form id='Qsrmt'><ins id='Qsrmt'></ins><ul id='Qsrmt'></ul><sub id='Qsrmt'></sub></form><legend id='Qsrmt'></legend><bdo id='Qsrmt'><pre id='Qsrmt'><center id='Qsrmt'></center></pre></bdo></b><th id='Qsrmt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Qsrmt'><tfoot id='Qsrmt'></tfoot><dl id='Qsrmt'><fieldset id='Qsrmt'></fieldset></dl></div>
                <bdo id='Qsrmt'></bdo><ul id='Qsrmt'></ul>

                • <legend id='Qsrmt'><style id='Qsrmt'><dir id='Qsrmt'><q id='Qsrmt'></q></dir></style></legend>

                  <small id='Qsrmt'></small><noframes id='Qsrmt'>

                    <tbody id='Qsrmt'></tbody>
                  本文介紹了如何將 QWebEngineProfile 設(shè)置為 QWebEngineView的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想為不同的 QWebEngineViews 設(shè)置不同的 QWebEngineProfiles,這意味著每個視圖都有自己的 cookie 存儲.我找不到任何有關(guān)它的文檔,因此將不勝感激所有幫助.任何將獨立 cookie 存儲設(shè)置為獨立 web 視圖的其他方法的任何建議也將有所幫助.干杯.

                  I want to set different QWebEngineProfiles to different QWebEngineViews meaning each view will have its own cookie store. I cant find any documentation on it therefore all help would be greatly appreciated. Any suggestion of another method of setting independent cookie stores to independent webviews will also help. Cheers.

                  代碼如下(此處連接信號格式不正確,但請放心,在真實代碼中是正確的):

                  Code is below (connecting the signal did not format properly here but rest assured it is correct in the real code):

                  from PyQt5.QtCore import *
                  from PyQt5.QtWidgets import * 
                  from PyQt5.QtGui import *
                  from PyQt5.QtWebEngineWidgets import *
                  import sys
                  
                  class MainWindow(QMainWindow):
                  
                      def __init__(self, *args, **kwargs):
                          super(MainWindow, self).__init__(*args,**kwargs)
                          self.browser={}
                          self.cookiestore={}
                          self.page={}
                          No = input("No: ")
                          for i in range(int(No)):
                              self.browser[str(i)] = QWebEngineView()
                              storagename = str(i)
                              self.cookiestore[str(i)] = QWebEngineProfile(storagename, self.browser[str(i)])
                              self.page[str(i)] = QWebEnginePage(self.cookiestore[str(i)], self.browser[str(i)])
                              self.browser[str(i)].setPage(self.page[str(i)])
                              self.browser[str(i)].load(QUrl("https://www.google.com"))
                        self.browser[str(i)].loadFinished.connect(lambda:self._loaded(str(i)))
                  
                      def _loaded(self, No):
                          self.browser[No].page().toHtml(self._callable)
                      def _callable(self, data):
                          self.html = data
                          if "" in self.html:
                              print("Done")
                          else:
                              print("wait")
                  
                  app = QApplication(sys.argv)
                  window = MainWindow()
                  app.exec_()
                  

                  推薦答案

                  如果你想建立一個 QWebEngineProfile 到一個 QWebEngineView 你必須通過一個 QWebEnginePage 如下所示:

                  If you want to establish a QWebEngineProfile to a QWebEngineView you must do it through a QWebEnginePage as I show below:

                  webview = QWebEngineView()
                  profile = QWebEngineProfile("somestorage", webview)
                  webpage = QWebEnginePage(profile, webview)
                  webview.setPage(webpage)
                  

                  例子:

                  from PyQt5.QtCore import QUrl
                  from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile, QWebEnginePage
                  from PyQt5.QtWidgets import QApplication
                  
                  if __name__ == '__main__':
                      import sys
                  
                      app = QApplication(sys.argv)
                      views = []
                      for i in range(5):
                          webview = QWebEngineView()
                          profile = QWebEngineProfile(f"storage-{i}", webview)
                          webpage = QWebEnginePage(profile, webview)
                          webview.setPage(webpage)
                          webview.load(QUrl("https://stackoverflow.com/questions/48142341/how-to-set-a-qwebengineprofile-to-a-qwebengineview"))
                          webview.show()
                          views.append(webview)
                      sys.exit(app.exec_())
                  

                  這篇關(guān)于如何將 QWebEngineProfile 設(shè)置為 QWebEngineView的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to bind a function to an Action from Qt menubar?(如何將函數(shù)綁定到 Qt 菜單欄中的操作?)
                  PyQt progress jumps to 100% after it starts(PyQt 啟動后進度躍升至 100%)
                  How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?(如何將 yaxis 刻度標簽設(shè)置在固定位置,以便當我向左或向右滾動時,yaxis 刻度標簽應(yīng)該可見
                  `QImage` constructor has unknown keyword `data`(`QImage` 構(gòu)造函數(shù)有未知關(guān)鍵字 `data`)
                  Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                  How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時顯示進度條?)
                        <bdo id='2J9bV'></bdo><ul id='2J9bV'></ul>
                      • <i id='2J9bV'><tr id='2J9bV'><dt id='2J9bV'><q id='2J9bV'><span id='2J9bV'><b id='2J9bV'><form id='2J9bV'><ins id='2J9bV'></ins><ul id='2J9bV'></ul><sub id='2J9bV'></sub></form><legend id='2J9bV'></legend><bdo id='2J9bV'><pre id='2J9bV'><center id='2J9bV'></center></pre></bdo></b><th id='2J9bV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2J9bV'><tfoot id='2J9bV'></tfoot><dl id='2J9bV'><fieldset id='2J9bV'></fieldset></dl></div>

                        <small id='2J9bV'></small><noframes id='2J9bV'>

                          <tbody id='2J9bV'></tbody>

                            <legend id='2J9bV'><style id='2J9bV'><dir id='2J9bV'><q id='2J9bV'></q></dir></style></legend>

                            <tfoot id='2J9bV'></tfoot>
                            主站蜘蛛池模板: 日本一区二区不卡视频 | 久草资源网站 | 亚洲字幕在线观看 | 亚洲小说图片 | 九九热在线免费观看 | 黄色日本片 | 亚洲综合一区二区三区 | www.99精品| 国产日韩欧美在线播放 | 欧美极品在线 | 成人av网页 | 国产黄色大片网站 | 一区二区三区不卡视频 | 欧美成人精品一区二区男人看 | 亚洲 91| 91日b| 91中文字幕在线观看 | 男人的天堂久久 | 国产成人精品一区二区 | 福利久久 | 国产一区二区中文字幕 | 欧美专区在线 | 精品久久久久久亚洲综合网 | 日本成人中文字幕在线观看 | 久热久草| 久久极品 | 91麻豆精品国产91久久久久久久久 | 蜜桃臀av一区二区三区 | 国产精品美女久久久久aⅴ国产馆 | 亚洲国产中文字幕 | 国产精品无码久久久久 | 亚洲一区二区免费视频 | 国产精品久久久久国产a级 欧美日韩国产免费 | 男女搞网站 | h视频免费在线观看 | 久久国产99 | 国产精品一卡二卡三卡 | 日本电影免费完整观看 | 在线欧美激情 | 日日碰碰 | 国产欧美在线观看 |