Category Archives: Qt/QML

QML FlowListView

In a “normal” QML ListView, typically, all elements have the same width; essentially, the width of the ListView. I had a use case in which I wanted to be able to display multiply elements side by side as well as … Continue reading

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

QML Duck-typing Example

When one wants to achieve dynamic behavior in object-oriented languages like C++ or Java one approach is to leverage inheritance; e.g., one could define a base class or an interface that defines a method, say “foo()”, that must be implemented … Continue reading

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

Full Source Code for QML vs. C++ Example

Upon request I just uploaded the full source code of my previous example on how to exchange data and objects between QML and C++. You can find the full source including a short readme that explains how to build an … Continue reading

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

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

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

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

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

QML SectionScroller vs. QAbstractListModel

A SectionScroller essentially allows quick scrolling in large lists. Though, there are some pitfalls when you want to use a custom C++/Qt based model with a SectionScroller in QML. Please note that this should work with a QAbstractItemModel based model … Continue reading

Posted in Qt/QML, Snippets | Tagged , , , , | 1 Comment