I have created a simple web browser in QT. I do not want to put a separate search bar next to the address bar. I want to make the address bar the search bar as well. For example i want to put conditions for things that are typed in the address bar, That way if “http://” or “www” or “.com”(or any other domain) is not present, then it will search for what was typed. The only thing i have is if those conditions are not met then what is typed in the address bar is plugged into:
http://www.google.com/search?q=what+was+typed
how would i approach this and how would i make it put the “+” between each word, if there is more than one word?
Also how would I apply the conditions in the search bar. Maybe using a loop like an “if else”?
to substitute look for replace method here. Also hide the Browser’s TextEdit and create your own TextEdit.
Tap signals of textChanged() and do things accordingly(like live-search) and other fancy tricks used by browsers of today.
Have a look here BEFORE YOU PROCEED