Reputation: 123
I want to make an application which looks something like this image:
I need it to open a website on click of the button.
I used a Tkinter code which looks like this:
def openweb():
webbrowser.open(url,new=new)
Btn = Button(root, text = "Check URL",command=openweb)
But it is opening in the default browser.
Is there some way to handle it?
Upvotes: 0
Views: 393
Reputation: 168967
Based on the little code you posted I guess you're using Tkinter – it doesn't come with an embeddable browser frame component, unfortunately.
You'll have to switch to something more complex like Qt (PyQt5 / PySide2) if you need an app that embeds a web browser view.
Upvotes: 1