Skip to content

First Hack with ItemsViewsNG

Friday, 10 April 2009  |  rich

People reading planet will have seen Thomas Zander's post about the new ItemViews framework the Trolls^H^H^HQt Software guys have been working on. It's very experimental right now, but I thought I'd have a quick look. I decided that a fun hack to write would be to take a standard listview that displays a list of URLs (boring!) and write a custom view that instead displays the rendered web page. I only spent a couple of hours on it, so the code is a hack (eg. you need to resize it to get the pages to display once they've loaded) but the results look ok. The whole code for this example comes in under 120 lines.

So, that's my hack in response to Thomas's challenge, who's next?

Here's an updated version that correctly updates the items when the page is loaded without requiring a resize.

And now version 3 that disables the scrollbars in the previews making things look a lot nicer.