diff options
author | Pierre Rossi <pierre.rossi@nokia.com> | 2009-11-19 17:34:43 (GMT) |
---|---|---|
committer | Pierre Rossi <pierre.rossi@nokia.com> | 2009-11-23 14:50:48 (GMT) |
commit | 44bea4d915ccfcb43b5392b4b915b9cb40f59faa (patch) | |
tree | 91f4e536c7e59b503854e693d6b77eb6428104b9 /examples/itemviews/frozencolumn/freezetablewidget.cpp | |
parent | 4cfc3a884835667fe8c3a6aa745dc4ace34794e4 (diff) | |
download | Qt-44bea4d915ccfcb43b5392b4b915b9cb40f59faa.zip Qt-44bea4d915ccfcb43b5392b4b915b9cb40f59faa.tar.gz Qt-44bea4d915ccfcb43b5392b4b915b9cb40f59faa.tar.bz2 |
A few tweaks to the frozen column example
Reviewed-By: Thierry
Diffstat (limited to 'examples/itemviews/frozencolumn/freezetablewidget.cpp')
-rw-r--r-- | examples/itemviews/frozencolumn/freezetablewidget.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/itemviews/frozencolumn/freezetablewidget.cpp b/examples/itemviews/frozencolumn/freezetablewidget.cpp index ee50ae1..72dc2a1 100644 --- a/examples/itemviews/frozencolumn/freezetablewidget.cpp +++ b/examples/itemviews/frozencolumn/freezetablewidget.cpp @@ -84,7 +84,8 @@ void FreezeTableWidget::init() //! [init part2] frozenTableView->setStyleSheet("QTableView { border: none;" - "background-color: #8EDE21;}"); //for demo purposes + "background-color: #8EDE21;" + "selection-background-color: #999}"); //for demo purposes frozenTableView->setSelectionModel(selectionModel()); for(int col=1; col<model()->columnCount(); col++) frozenTableView->setColumnHidden(col, true); @@ -146,6 +147,12 @@ QModelIndex FreezeTableWidget::moveCursor(CursorAction cursorAction, } //! [navigate] +void FreezeTableWidget::scrollTo (const QModelIndex & index, ScrollHint hint){ + if(index.column()>0) + QTableView::scrollTo(index, hint); +} + + //! [geometry] void FreezeTableWidget::updateFrozenTableGeometry() |