This commit is contained in:
Martin Rotter 2013-11-15 22:24:38 +01:00
parent 292cfde3e2
commit b946da1b87
3 changed files with 9 additions and 0 deletions

View File

@ -17,3 +17,7 @@ MessagesProxyModel::MessagesProxyModel(QObject *parent)
MessagesProxyModel::~MessagesProxyModel() {
qDebug("Destroying MessagesProxyModel instance.");
}
bool MessagesProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {
return QSortFilterProxyModel::lessThan(left, right);
}

View File

@ -14,6 +14,9 @@ class MessagesProxyModel : public QSortFilterProxyModel {
explicit MessagesProxyModel(QObject *parent = 0);
virtual ~MessagesProxyModel();
protected:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
private:
MessagesModel *m_sourceModel;
};

View File

@ -20,4 +20,6 @@ void MessagesView::setupAppearance() {
setDragDropMode(QAbstractItemView::NoDragDrop);
setExpandsOnDoubleClick(false);
setRootIsDecorated(false);
setItemsExpandable(false);
setSortingEnabled(true);
}