omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Manipulate Webview in .pyui file with the corresponding .py file

    Pythonista
    ui module webview pyui
    2
    2
    2533
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • procryon
      procryon last edited by

      Hi all, I've started learning how to use the UI views and web views and such and have a simple question.

      I made a new file with UI and added a webview in the UI designer. How would I got into the other file created alongside the UI file and load "www.google.com" in it?

      Here's the code in the script:

      import ui
      import urllib
      
      v = ui.load_view()
      v.present('fullscreen')
      

      And in the UI, there's just a webview half the size of the grid sheet. I want to load "www.google.com" onto that webview.

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        try v['webview1'].load_url('https://google.com')

        or replace webview1 with whatever you named your webview in the designer.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Powered by NodeBB Forums | Contributors