Trouble making search bar for browser
I am new to Qt and programming in general. If this thread is in the wrong section, just let me know.
Ok, so basically I have been working on my own homemade browser, and I have encountered a snag. I have googled and searched all over, but I can't really find a good answer.
The problem is that I am trying to make a search bar for my browser. When I say 'search bar' I mean a bar that you can type into that will google your query. I already have a working address bar where I can search URLs, but navigating the internet via URL is a pain! I want a bar where I can type 'cat' and it will google the term, rather than have to type in 'www.wikipedia/cat.com'
Would someone please explain to me how I could go about making a search bar? If there is something wrong with my post, please let me know. Im trying to learn. Thanks in advance!
I am using Qt 5 in Ubuntu 12.04 if you need that kind of info.
You want the same search bar as in other browsers like opera, right? If you type something, the google page with results will be shown?
There is two possible solutions:
- simply open URL with search term in your browser: https://www.google.de/search?q=<your search term here>
- use Custom Google Search API.