mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Make the QTableWidget a QTableView
Rewrite some code to use a QTableView widget instead of a QTableWidget in the browse tab of the main window, or more presicely in the new extended table widget class. This way the widget and the data model are separated which on the one hand means a bit more work on our side but on the other hand also gives us a bit more flexibility. And more importantly at the moment: This means both, the browse tab and the sql tab, use a table view now - that's going to be helpful for the next commit...
This commit is contained in:
@@ -4,14 +4,8 @@
|
||||
#include <QKeyEvent>
|
||||
#include "ExtendedTableWidget.h"
|
||||
|
||||
ExtendedTableWidget::ExtendedTableWidget(int rows, int columns, QWidget* parent) :
|
||||
QTableWidget(rows, columns, parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ExtendedTableWidget::ExtendedTableWidget(QWidget* parent) :
|
||||
QTableWidget(parent)
|
||||
QTableView(parent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -57,5 +51,5 @@ void ExtendedTableWidget::keyPressEvent(QKeyEvent* event)
|
||||
if(event->matches(QKeySequence::Copy))
|
||||
copy();
|
||||
else
|
||||
QTableWidget::keyPressEvent(event);
|
||||
QTableView::keyPressEvent(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user