src/format.h

changeset 1244
68e126e8c629
parent 1159
6ad8cdcd88d9
child 1316
31f4293cec30
--- a/src/format.h	Tue Feb 13 15:43:55 2018 +0200
+++ b/src/format.h	Wed Feb 14 15:17:30 2018 +0200
@@ -19,6 +19,7 @@
 #pragma once
 #include <QIODevice>
 #include <QGenericMatrix>
+#include <QModelIndex>
 #include "basics.h"
 #include "colors.h"
 #include "types/matrix.h"
@@ -87,6 +88,11 @@
 		m_text += "}";
 	}
 
+	StringFormatArg(const QModelIndex& index)
+	{
+		m_text = QString("{%1, %2}").arg(index.row(), index.column());
+	}
+
 	inline QString text() const
 	{
 		return m_text;

mercurial