--- author: '' category: '' date: 2011/03/05 23:46 description: '' link: '' priority: '' slug: BB949 tags: kde, nerdness, open source, programming, pyqt, python, qt title: 'De Vicenzo: A much cooler mini web browser.' type: text updated: 2011/03/05 23:46 url_type: '' --- It seems it was only a few days ago that I started this project. Oh, wait, yes, `it was just a few days ago! `_ If you don't want to read that again, the idea is to see just how much code is needed to turn Qt's WebKit engine into a fully-fledged browser. To do that, I set myself a completely arbitrary limit: 128 lines of code. So, as of now, I declare it feature-complete. The new features are: * Tabbed browsing (you can add/remove tabs) * Bookmarks (you can add/remove them, and choose them from a drop-down menu) This is what already worked: * Zoom in (Ctrl++) * Zoom out (Ctrl+-) * Reset Zoom (Ctrl+=) * Find (Ctrl+F) * Hide find (Esc) * Buttons for back/forward and reload * URL entry that matches the page + autocomplete from history + smart entry (adds http://, that kind of thing) * Plugins support (including flash) * The window title shows the page title (without browser advertising ;-) * Progress bar for page loading * Statusbar that shows hovered links URL * Takes a URL on the command line, or opens http://python.org * Multiplatform (works in any place QtWebKit works) So... how much code was needed for this? **87 LINES OF CODE** Or if you want the PEP8-compliant version, **115 LINES OF CODE**. Before anyone says it: *yes, I know the rendering engine and the toolkit are huge*. What I wrote is just the chrome around them, just like Arora, Rekonq, Galeon, Epiphany and a bunch of others do. It's simple, minimalistic chrome, but it works pretty good, IMVHO. Here it is in (buggy) action: .. raw:: html It's more or less feature-complete for what I expected to be achievable, but it still needs some fixes. You can see the code at it's own home page: http://devicenzo.googlecode.com