Bokeh plots do not display in QWebView

后端 未结 2 1621
难免孤独
难免孤独 2021-01-16 09:11

I have following code that works on linux and my windows 7 machine even using WinPython environment:

   # plt_file is valid html produced by Bokeh and that i         


        
2条回答
  •  梦毁少年i
    2021-01-16 09:25

    would this work better ?

       plot = ""
       with open(plt_file, "r") as f:
            plot = f.read()
       # self.plot_web_view.setContent(plot)
       url = QUrl(plt_file)
       self.plot_web_view.setHtml(plot, url)
    

提交回复
热议问题