how to get beeware webview to show web page content

29 Views Asked by At

Trying to use beeware for android but starting on windows and a basic example just shows a blank screen with no web page content (on windows desktop windows 11) - any ideas on how to use toga WebView to display page content ?

import toga
from toga.style import Pack
# opens the window but not working since it doesnt show the content of the web page in the window 
class WebViewApp(toga.App): # beeware apps inherit from toga.App and define a startup method
    def startup(self):
        self.main_window = toga.MainWindow(title=self.formal_name)
        url = 'https://panel.holoviz.org/reference/widgets/Tabulator.html'
        self.webview_widget = toga.WebView(style=Pack(flex=1),url=url)
        
        self.webview_widget.url = 'https://panel.holoviz.org/reference/widgets/Tabulator.html'
        
        self.main_window.content = self.webview_widget
        print (self.main_window.content )
        self.main_window.show()

def main():
    return WebViewApp('Panel Tabulator', 'org.beeware.panel_tabulator')

if __name__ == '__main__':
    app = main()
    app.main_loop()
0

There are 0 best solutions below