diff options
author | Arno <am@disconnect.de> | 2013-04-10 21:36:26 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-04-10 21:36:26 +0200 |
commit | a39a1118320c2c2e291f9e771ab75d32549431a7 (patch) | |
tree | a82ae27aa4e0e398e99b1127b51d65da36f1c5b9 /mappingtableeditor.cpp | |
parent | 69791ade746638180a959c190fa5db6519c83a38 (diff) | |
download | SheMov-a39a1118320c2c2e291f9e771ab75d32549431a7.tar.gz SheMov-a39a1118320c2c2e291f9e771ab75d32549431a7.tar.bz2 SheMov-a39a1118320c2c2e291f9e771ab75d32549431a7.zip |
Fix setAlternatignRowColors
Well, what started as a try to simplify QTreeView ended in a mass header
murder...
What happened:
* I searched for a way to let every QTreeView honor the
setAlternatingRowcolors() setting. Unfortunately it isn't enough to just
set the global palette and set it to true. So every QTreeView is now
derived from SmTreeView
* SmTreeView registers itself with SmGlobals, so the property is set
_after_ it's constructed. It's definitely not enough to call it in the
constructor. I guess that's a bug. But it's enough to append the
SmTreeView to a QList<QWidget*> in SmGlobals and call it _after_ the
painting is done.
* As an added Bonus we can add virt. funcs to every SmTreeView at will
While at it I realized that most of the included headers were void, so
remove them. No idea what impact it has on the bin size...
Diffstat (limited to 'mappingtableeditor.cpp')
-rw-r--r-- | mappingtableeditor.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/mappingtableeditor.cpp b/mappingtableeditor.cpp index f7ac64c..1f6d19d 100644 --- a/mappingtableeditor.cpp +++ b/mappingtableeditor.cpp @@ -5,17 +5,14 @@ 2 of the License, or (at your option) any later version. */ -#include <QSqlDatabase> #include <QSqlQuery> #include <QContextMenuEvent> #include <QtWidgets/QMenu> -#include <QtWidgets/QVBoxLayout> #include <QtWidgets/QHBoxLayout> #include <QtWidgets/QLineEdit> #include <QtWidgets/QPushButton> #include <QtWidgets/QLabel> #include <QtWidgets/QMessageBox> -#include <QtWidgets/QAction> #include <QSortFilterProxyModel> #include "mappingtableeditor.h" @@ -129,7 +126,7 @@ void MappingTableEditor::editItem(){ } //view -MappingTableEditorView::MappingTableEditorView(QWidget *parent) : QTreeView(parent) {} +MappingTableEditorView::MappingTableEditorView(QWidget *parent) : SmTreeView(parent) {} void MappingTableEditorView::contextMenuEvent(QContextMenuEvent *e){ QMenu contextMenu(this); |