0

I want to make an application which looks something like this image:

enter image description here

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?

4
  • Definitely there's a way. Commented Jul 10, 2019 at 15:44
  • so you want the web page to open on your application or you want the web page to open a browser of your choosing? Commented Jul 10, 2019 at 15:49
  • @Hamuel I want the web page to open in my application. Commented Jul 11, 2019 at 4:58
  • @OlvinRoght Can you please tell me how to do it? Commented Jul 11, 2019 at 4:58

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes I am using Tkinter. And thanks a lot. Will try doing it using QT

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.