Category Archives: Snippets

Q To-Do Version 0.7.1 + Updated QML TreeView

I had a little time to continue hacking on the Qt/QML port of To-Do O, Q To-Do. During this work I also reworked and updated my QML TreeView code a bit. You can get a compiled version for Harmattan (N9/N950) … Continue reading

Posted in Announcements, Q To-Do, Qt/QML, Snippets, To-Do-O | Tagged , , , , , | 7 Comments

Display Relative Paths in taglist.vim

While the “Tag List” plug-in for Vim is really great, there is one peculiarity that I wasn’t so happy about. By default the displayed directory names are absolute paths. Hence, working in a little bit (depending on the displayed width … Continue reading

Posted in Snippets | Tagged , , | Leave a comment

SectionScroller vs. QAbstractProxyModel

In this post I wrote about how to use a Qt model with the QML SectionScroller. A more advanced use case is to encapsulate such a “basic” model in a QAbstractProxyModel instance like QSortFilterProxyModel. This at first will brake your … Continue reading

Posted in Qt/QML, Snippets | Tagged , , | Leave a comment

Speed up TDD in Clojure with lein-reload

Personally, I am a big fan of the Test-driven Development (TDD) approach; iterative development by writing tests first and then implementing the required functionality is just so much fun and very efficient as well. As a very nice side effect … Continue reading

Posted in Snippets | Tagged , , | Leave a comment

Hotplug an External Screen to your Laptop on Linux

With udev you can trigger actions when an external screen/monitor is connected. This is, e.g., useful when you want to automatically perform some actions when an external Screen is connected to a laptop. Such actions could be to automatically enable … Continue reading

Posted in Snippets | Tagged , | 1 Comment

Updated QML C++ Object Example

Inspired by a comment to my QML C++ Object Example I updated this example to also show how to work similarly with QML lists.

Posted in Qt/QML, Snippets | Tagged , , | Leave a comment

Exchange Data and Objects between C++ and QML and vice versa

In this post I show how to exchange data and objects between C++ and QML and vice versa. I initially created a simple example from some old code due to a question on IRC. While I was at it I … Continue reading

Posted in Qt/QML, Snippets | Tagged , | 11 Comments

LaTeX lstlisting: Easily Copy&Paste Snippets from PDF

I regularly use LaTeX for documentation. While lstlisting is really great for printing snippets of code out of the box you may encounter some situations where you need to tweak it a little to fit your needs. Imagine you have, … Continue reading

Posted in Snippets | Tagged | Leave a comment

New Version of the QML TreeView

I already posted an implementation of a QML TreeView some time ago. In the meantime I reworked this implementation, improved data and selection handling (the TreeView now comes e.g. with currentItem and currentIndex properties), added some (hopefully useful) comments, and … Continue reading

Posted in Qt/QML, Snippets | Tagged , , , , | Leave a comment

Reorder Items in a QML ListView via Touch Gestures

The stock QML ListView is pretty handy for displaying simple data structures. While porting To-Do-O to Qt/QML (MeeGo/Harmattan to be more precise) I stumbled across a use case where I want to move / reorder items in a list. In … Continue reading

Posted in Qt/QML, Snippets | Tagged , , , , | Leave a comment