From 7099d5105d3c05cae8c5ab09ed20f82f56608db7 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Mon, 7 Oct 2013 21:04:51 +0200 Subject: [PATCH] better UI handling for event views --- src/dialogs/eventedit.cpp | 5 ++++- src/mwin/eventstab.cpp | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dialogs/eventedit.cpp b/src/dialogs/eventedit.cpp index b55151e..610a2f9 100644 --- a/src/dialogs/eventedit.cpp +++ b/src/dialogs/eventedit.cpp @@ -4,7 +4,7 @@ // Description: // // -// Author: Konrad Rosenbaum , (C) 2007-2011 +// Author: Konrad Rosenbaum , (C) 2007-2013 // // Copyright: See README/COPYING.GPL files that come with this distribution // @@ -170,6 +170,9 @@ MEventEditor::MEventEditor(QWidget*pw,qint64 id) connect(p,SIGNAL(clicked()),this,SLOT(removePrice())); pricetable->setModel(pricemodel=new QStandardItemModel(this)); pricetable->setEditTriggers(QAbstractItemView::NoEditTriggers); + pricetable->setSelectionMode(QAbstractItemView::SingleSelection); + pricetable->setSelectionBehavior(QAbstractItemView::SelectRows); + vl2->addWidget(new QLabel(tr("Hint: Prices with the lowest Ordering number are shown first when selecting a category for tickets."))); updatePrice(); vl->addLayout(hl=new QHBoxLayout,0); diff --git a/src/mwin/eventstab.cpp b/src/mwin/eventstab.cpp index bf5f94a..1017e8a 100644 --- a/src/mwin/eventstab.cpp +++ b/src/mwin/eventstab.cpp @@ -4,7 +4,7 @@ // Description: // // -// Author: Konrad Rosenbaum , (C) 2007-2011 +// Author: Konrad Rosenbaum , (C) 2007-2013 // // Copyright: See README/COPYING.GPL files that come with this distribution // @@ -56,6 +56,7 @@ MEventsTab::MEventsTab(QString pk) hl->addWidget(eventtable=new QTableView,10); eventtable->setModel(eventmodel=new QStandardItemModel(this)); eventtable->setSelectionMode(QAbstractItemView::SingleSelection); + eventtable->setSelectionBehavior(QAbstractItemView::SelectRows); eventtable->setEditTriggers(QAbstractItemView::NoEditTriggers); eventtable->verticalHeader()->hide(); hl->addSpacing(5); -- 1.7.2.5