Add QTableView support (#406)

* Add QTableView support

* Fix template to move public expanded methods to private

Co-authored-by: Atul R <atulanand94@gmail.com>
This commit is contained in:
feng8848 2020-02-20 14:53:31 +08:00 committed by GitHub
parent ab6c28166e
commit cf7d241b51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 550 additions and 4 deletions

View File

@ -71,6 +71,7 @@ add_library(${CORE_WIDGETS_ADDON} SHARED
"${PROJECT_SOURCE_DIR}/src/cpp/lib/QtWidgets/QFileDialog/qfiledialog_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/lib/QtWidgets/QListWidget/qlistwidget_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/lib/QtWidgets/QListWidgetItem/qlistwidgetitem_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/lib/QtWidgets/QTableView/qtableview_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/lib/QtWidgets/QTableWidget/qtablewidget_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/lib/QtWidgets/QTableWidgetItem/qtablewidgetitem_wrap.cpp"
"${PROJECT_SOURCE_DIR}/src/cpp/lib/QtWidgets/QPainter/qpainter_wrap.cpp"
@ -120,6 +121,7 @@ add_library(${CORE_WIDGETS_ADDON} SHARED
"${PROJECT_SOURCE_DIR}/src/cpp/include/nodegui/QtWidgets/QDial/ndial.hpp"
"${PROJECT_SOURCE_DIR}/src/cpp/include/nodegui/QtWidgets/QFileDialog/nfiledialog.hpp"
"${PROJECT_SOURCE_DIR}/src/cpp/include/nodegui/QtWidgets/QListWidget/nlistwidget.hpp"
"${PROJECT_SOURCE_DIR}/src/cpp/include/nodegui/QtWidgets/QTableView/ntableview.hpp"
"${PROJECT_SOURCE_DIR}/src/cpp/include/nodegui/QtWidgets/QTableWidget/ntablewidget.hpp"
"${PROJECT_SOURCE_DIR}/src/cpp/include/nodegui/QtWidgets/QLineEdit/nlineedit.hpp"
"${PROJECT_SOURCE_DIR}/src/cpp/include/nodegui/QtWidgets/QMainWindow/nmainwindow.hpp"

View File

@ -0,0 +1,16 @@
#pragma once
#include <QTableView>
#include "Extras/Utils/nutils.h"
#include "QtWidgets/QTableView/qtableview_macro.h"
#include "core/NodeWidget/nodewidget.h"
class DLL_EXPORT NTableView : public QTableView, public NodeWidget {
Q_OBJECT
NODEWIDGET_IMPLEMENTATIONS(QTableView)
public:
using QTableView::QTableView;
void connectSignalsToEventEmitter() { QTABLEVIEW_SIGNALS }
};

View File

@ -0,0 +1,254 @@
#pragma once
#include <QTableView>
#include "QtWidgets/QAbstractItemView/qabstractitemview_macro.h"
/*
This macro adds common QTableView exported methods
The exported methods are taken into this macro to avoid writing them in each
and every widget we export.
*/
#ifndef QTABLEVIEW_WRAPPED_METHODS_DECLARATION
#define QTABLEVIEW_WRAPPED_METHODS_DECLARATION \
\
QABSTRACTITEMVIEW_WRAPPED_METHODS_DECLARATION \
\
Napi::Value clearSpans(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
this->instance->clearSpans(); \
return env.Null(); \
} \
Napi::Value columnAt(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int x = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Number::New(env, this->instance->columnAt(x)); \
} \
Napi::Value columnSpan(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
int column = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Number::New(env, this->instance->columnSpan(row, column)); \
} \
Napi::Value columnViewportPosition(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Number::New(env, \
this->instance->columnViewportPosition(column)); \
} \
Napi::Value columnWidth(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Number::New(env, this->instance->columnWidth(column)); \
} \
Napi::Value isColumnHidden(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Boolean::New(env, this->instance->isColumnHidden(column)); \
} \
Napi::Value isRowHidden(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Boolean::New(env, this->instance->isRowHidden(row)); \
} \
Napi::Value rowAt(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int y = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Number::New(env, this->instance->rowAt(y)); \
} \
Napi::Value rowHeight(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Number::New(env, this->instance->rowHeight(row)); \
} \
Napi::Value rowSpan(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
int column = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Number::New(env, this->instance->rowSpan(row, column)); \
} \
Napi::Value rowViewportPosition(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
return Napi::Number::New(env, this->instance->rowViewportPosition(row)); \
} \
Napi::Value setColumnHidden(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
bool hide = info[1].As<Napi::Boolean>().Value(); \
this->instance->setColumnHidden(column, hide); \
return env.Null(); \
} \
Napi::Value setColumnWidth(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
int width = info[1].As<Napi::Number>().Int32Value(); \
this->instance->setColumnWidth(column, width); \
return env.Null(); \
} \
Napi::Value setRowHeight(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
int height = info[1].As<Napi::Number>().Int32Value(); \
this->instance->setRowHeight(row, height); \
return env.Null(); \
} \
Napi::Value setRowHidden(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
bool hide = info[1].As<Napi::Boolean>().Value(); \
this->instance->setRowHidden(row, hide); \
return env.Null(); \
} \
Napi::Value setSpan(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
int column = info[1].As<Napi::Number>().Int32Value(); \
int rowSpanCount = info[2].As<Napi::Number>().Int32Value(); \
int columnSpanCount = info[3].As<Napi::Number>().Int32Value(); \
this->instance->setSpan(row, column, rowSpanCount, columnSpanCount); \
return env.Null(); \
} \
Napi::Value hideColumn(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
this->instance->hideColumn(column); \
return env.Null(); \
} \
Napi::Value hideRow(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
this->instance->hideRow(row); \
return env.Null(); \
} \
Napi::Value resizeColumnToContents(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
this->instance->resizeColumnToContents(column); \
return env.Null(); \
} \
Napi::Value resizeColumnsToContents(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
this->instance->resizeColumnsToContents(); \
return env.Null(); \
} \
Napi::Value resizeRowToContents(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
this->instance->resizeRowToContents(row); \
return env.Null(); \
} \
Napi::Value resizeRowsToContents(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
this->instance->resizeRowsToContents(); \
return env.Null(); \
} \
Napi::Value selectColumn(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
this->instance->selectColumn(column); \
return env.Null(); \
} \
Napi::Value selectRow(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
this->instance->selectRow(row); \
return env.Null(); \
} \
Napi::Value showColumn(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
this->instance->showColumn(column); \
return env.Null(); \
} \
Napi::Value showRow(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int row = info[0].As<Napi::Number>().Int32Value(); \
this->instance->showRow(row); \
return env.Null(); \
} \
Napi::Value sortByColumn(const Napi::CallbackInfo& info) { \
Napi::Env env = info.Env(); \
Napi::HandleScope scope(env); \
int column = info[0].As<Napi::Number>().Int32Value(); \
int orderInt = info[1].As<Napi::Number>().Int32Value(); \
Qt::SortOrder order = static_cast<Qt::SortOrder>(orderInt); \
this->instance->sortByColumn(column, order); \
return env.Null(); \
}
#endif // QTABLEVIEW_WRAPPED_METHODS_DECLARATION
#ifndef QTABLEVIEW_WRAPPED_METHODS_EXPORT_DEFINE
#define QTABLEVIEW_WRAPPED_METHODS_EXPORT_DEFINE(WidgetWrapName) \
\
QABSTRACTITEMVIEW_WRAPPED_METHODS_EXPORT_DEFINE(WidgetWrapName) \
\
InstanceMethod("clearSpans", &WidgetWrapName::clearSpans), \
InstanceMethod("columnAt", &WidgetWrapName::columnAt), \
InstanceMethod("columnSpan", &WidgetWrapName::columnSpan), \
InstanceMethod("columnViewportPosition", \
&WidgetWrapName::columnViewportPosition), \
InstanceMethod("columnWidth", &WidgetWrapName::columnWidth), \
InstanceMethod("isColumnHidden", &WidgetWrapName::isColumnHidden), \
InstanceMethod("isRowHidden", &WidgetWrapName::isRowHidden), \
InstanceMethod("rowAt", &WidgetWrapName::rowAt), \
InstanceMethod("rowHeight", &WidgetWrapName::rowHeight), \
InstanceMethod("rowSpan", &WidgetWrapName::rowSpan), \
InstanceMethod("rowViewportPosition", \
&WidgetWrapName::rowViewportPosition), \
InstanceMethod("setColumnHidden", &WidgetWrapName::setColumnHidden), \
InstanceMethod("setColumnWidth", &WidgetWrapName::setColumnWidth), \
InstanceMethod("setRowHeight", &WidgetWrapName::setRowHeight), \
InstanceMethod("setRowHidden", &WidgetWrapName::setRowHidden), \
InstanceMethod("setSpan", &WidgetWrapName::setSpan), \
InstanceMethod("hideColumn", &WidgetWrapName::hideColumn), \
InstanceMethod("hideRow", &WidgetWrapName::hideRow), \
InstanceMethod("resizeColumnToContents", \
&WidgetWrapName::resizeColumnToContents), \
InstanceMethod("resizeColumnsToContents", \
&WidgetWrapName::resizeColumnsToContents), \
InstanceMethod("resizeRowToContents", \
&WidgetWrapName::resizeRowToContents), \
InstanceMethod("resizeRowsToContents", \
&WidgetWrapName::resizeRowsToContents), \
InstanceMethod("selectColumn", &WidgetWrapName::selectColumn), \
InstanceMethod("selectRow", &WidgetWrapName::selectRow), \
InstanceMethod("showColumn", &WidgetWrapName::showColumn), \
InstanceMethod("showRow", &WidgetWrapName::showRow), \
InstanceMethod("sortByColumn", &WidgetWrapName::sortByColumn),
#endif // QTABLEVIEW_WRAPPED_METHODS_EXPORT_DEFINE
#ifndef QTABLEVIEW_SIGNALS
#define QTABLEVIEW_SIGNALS QABSTRACTITEMVIEW_SIGNALS
#endif // QTABLEVIEW_SIGNALS

View File

@ -0,0 +1,25 @@
#pragma once
#include <napi.h>
#include <QPointer>
#include "Extras/Utils/nutils.h"
#include "QtWidgets/QTableView/ntableview.hpp"
#include "QtWidgets/QTableView/qtableview_macro.h"
class DLL_EXPORT QTableViewWrap : public Napi::ObjectWrap<QTableViewWrap> {
QTABLEVIEW_WRAPPED_METHODS_DECLARATION
private:
QPointer<NTableView> instance;
bool disableDeletion;
public:
static Napi::Object init(Napi::Env env, Napi::Object exports);
QTableViewWrap(const Napi::CallbackInfo& info);
~QTableViewWrap();
NTableView* getInternalInstance();
// class constructor
static Napi::FunctionReference constructor;
// wrapped methods
};

View File

@ -0,0 +1,54 @@
#include "QtWidgets/QTableView/qtableview_wrap.h"
#include "Extras/Utils/nutils.h"
Napi::FunctionReference QTableViewWrap::constructor;
Napi::Object QTableViewWrap::init(Napi::Env env, Napi::Object exports) {
Napi::HandleScope scope(env);
char CLASSNAME[] = "QTableView";
Napi::Function func =
DefineClass(env, CLASSNAME,
{QTABLEVIEW_WRAPPED_METHODS_EXPORT_DEFINE(QTableViewWrap)});
constructor = Napi::Persistent(func);
exports.Set(CLASSNAME, func);
return exports;
}
NTableView* QTableViewWrap::getInternalInstance() { return this->instance; }
QTableViewWrap::~QTableViewWrap() {
if (!this->disableDeletion) {
extrautils::safeDelete(this->instance);
}
}
QTableViewWrap::QTableViewWrap(const Napi::CallbackInfo& info)
: Napi::ObjectWrap<QTableViewWrap>(info) {
Napi::Env env = info.Env();
Napi::HandleScope scope(env);
if (info.Length() > 0 && info[0].IsExternal()) {
// --- if external ---
this->instance = info[0].As<Napi::External<NTableView>>().Data();
if (info.Length() == 2) {
this->disableDeletion = info[1].As<Napi::Boolean>().Value();
}
} else {
// --- regular cases ---
if (info.Length() == 1) {
Napi::Object parentObject = info[0].As<Napi::Object>();
QWidgetWrap* parentWidgetWrap =
Napi::ObjectWrap<QWidgetWrap>::Unwrap(parentObject);
this->instance = new NTableView(parentWidgetWrap->getInternalInstance());
} else if (info.Length() == 0) {
this->instance = new NTableView();
} else {
Napi::TypeError::New(env, "Wrong number of arguments")
.ThrowAsJavaScriptException();
}
}
this->rawData = extrautils::configureQWidget(
this->getInternalInstance(), this->getInternalInstance()->getFlexNode(),
false);
}

View File

@ -63,6 +63,7 @@
#include "QtWidgets/QStatusBar/qstatusbar_wrap.h"
#include "QtWidgets/QSystemTrayIcon/qsystemtrayicon_wrap.h"
#include "QtWidgets/QTabWidget/qtabwidget_wrap.h"
#include "QtWidgets/QTableView/qtableview_wrap.h"
#include "QtWidgets/QTableWidget/qtablewidget_wrap.h"
#include "QtWidgets/QTableWidgetItem/qtablewidgetitem_wrap.h"
#include "QtWidgets/QTimeEdit/qtimeedit_wrap.h"
@ -112,6 +113,7 @@ Napi::Object Main(Napi::Env env, Napi::Object exports) {
QFileDialogWrap::init(env, exports);
QListWidgetWrap::init(env, exports);
QListWidgetItemWrap::init(env, exports);
QTableViewWrap::init(env, exports);
QTableWidgetWrap::init(env, exports);
QTableWidgetItemWrap::init(env, exports);
QPainterWrap::init(env, exports);

View File

@ -1,7 +1,46 @@
import { QDateEdit } from './lib/QtWidgets/QDateEdit';
import { QTableView } from './lib/QtWidgets/QTableView';
import { QWidget } from './lib/QtWidgets/QWidget';
import { FlexLayout } from './lib/core/FlexLayout';
import { QTableWidget } from './lib/QtWidgets/QTableWidget';
const dateEdit = new QDateEdit();
// the code commented below have no problem
/*const view = new QTableView();
dateEdit.show();
view.setStyleSheet(`
QTableView {
min-width:300px;
min-height:200px;
}
`);
view.show();
*/
(global as any).dateEdit = dateEdit;
const widget = new QWidget();
const layout = new FlexLayout();
const view = new QTableView();
const table = new QTableWidget(5, 5);
view.setStyleSheet(`
QTableView {
min-width:300px;
min-height:200px;
}
`);
table.setStyleSheet(`
QTableView {
min-width:300px;
min-height:200px;
}
`);
widget.setLayout(layout);
layout.addWidget(view); // app crash when add view to the layout
layout.addWidget(table); // app run ok when add table to the layout
widget.setInlineStyle('flex:1;');
widget.resize(600, 400);
widget.show();
//(global as any).main = view;
(global as any).main = widget;

View File

@ -53,6 +53,7 @@ export { QStackedWidget, QStackedWidgetSignals } from './lib/QtWidgets/QStackedW
export { QListWidget, QListWidgetSignals } from './lib/QtWidgets/QListWidget';
export { QListWidgetItem } from './lib/QtWidgets/QListWidgetItem';
export { QTabWidget, QTabWidgetSignals } from './lib/QtWidgets/QTabWidget';
export { QTableView, QTableViewSignals } from './lib/QtWidgets/QTableView';
export { QTableWidget, QTableWidgetSignals } from './lib/QtWidgets/QTableWidget';
export { QTableWidgetItem } from './lib/QtWidgets/QTableWidgetItem';
export { QMenu, QMenuSignals } from './lib/QtWidgets/QMenu';

View File

@ -0,0 +1,153 @@
import addon from '../utils/addon';
import { NodeWidget } from './QWidget';
import { NativeElement } from '../core/Component';
import { SortOrder, PenStyle } from '../QtEnums';
import { QAbstractItemView, QAbstractItemViewSignals } from './QAbstractItemView';
/**
> The QTableView class provides a default model/view implementation of a table view.
* **This class is a JS wrapper around Qt's [QTableView class](https://doc.qt.io/qt-5/qtableview.html)**
### Example
```javascript
const { QTableView } = require("@nodegui/nodegui");
const tableview = new QTableView();
```
*/
export abstract class NodeTableView<Signals extends QTableViewSignals> extends QAbstractItemView<Signals> {
setCornerButtonEnabled(enable: boolean): void {
this.setProperty('cornerButtonEnabled', enable);
}
isCornerButtonEnabled(): boolean {
return this.property('cornerButtonEnabled').toBool();
}
setGridStyle(style: PenStyle): void {
this.setProperty('gridStyle', style);
}
gridStyle(): PenStyle {
return this.property('gridStyle').toInt();
}
setShowGrid(show: boolean): void {
this.setProperty('showGrid', show);
}
showGrid(): boolean {
return this.property('showGrid').toBool();
}
setSortingEnabled(enable: boolean): void {
this.setProperty('sortingEnabled', enable);
}
isSortingEnabled(): boolean {
return this.property('sortingEnabled').toBool();
}
setWordWrap(on: boolean): void {
this.setProperty('wordWrap', on);
}
wordWrap(): boolean {
return this.property('wordWrap').toBool();
}
clearSpans(): void {
this.native.clearSpans();
}
columnAt(x: number): number {
return this.native.columnAt(x);
}
columnSpan(row: number, column: number): number {
return this.native.columnSpan(row, column);
}
columnViewportPosition(column: number): number {
return this.native.columnViewportPosition(column);
}
setColumnWidth(column: number, width: number): void {
this.native.setColumnWidth(column, width);
}
columnWidth(column: number): number {
return this.native.columnWidth(column);
}
setColumnHidden(column: number, hide: boolean): void {
this.native.setColumnHidden(column, hide);
}
isColumnHidden(column: number): boolean {
return this.native.isColumnHidden(column);
}
setRowHidden(row: number, hide: boolean): void {
this.native.setRowHidden(row, hide);
}
isRowHidden(row: number): boolean {
return this.native.isRowHidden(row);
}
rowAt(y: number): number {
return this.native.rowAt(y);
}
setRowHeight(row: number, height: number): void {
this.native.setRowHeight(row, height);
}
rowHeight(row: number): number {
return this.native.rowHeight(row);
}
rowSpan(row: number, column: number): number {
return this.native.rowSpan(row, column);
}
rowViewportPosition(row: number): number {
return this.native.rowViewportPosition(row);
}
setSpan(row: number, column: number, rowSpanCount: number, columnSpanCount: number): void {
this.native.setSpan(row, column, rowSpanCount, columnSpanCount);
}
hideColumn(column: number): void {
this.native.hideColumn(column);
}
hideRow(row: number): void {
this.native.hideRow(row);
}
resizeColumnToContents(column: number): void {
this.native.resizeColumnToContents(column);
}
resizeColumnsToContents(): void {
this.native.resizeColumnsToContents();
}
resizeRowToContents(row: number): void {
this.native.resizeRowToContents(row);
}
resizeRowsToContents(): void {
this.native.resizeRowsToContents();
}
selectColumn(column: number): void {
this.native.selectColumn(column);
}
selectRow(row: number): void {
this.native.selectRow(row);
}
showColumn(column: number): void {
this.native.showColumn(column);
}
showRow(row: number): void {
this.native.showRow(row);
}
sortByColumn(column: number, order: SortOrder): void {
this.native.sortByColumn(column, order);
}
}
export class QTableView extends NodeTableView<QTableViewSignals> {
native: NativeElement;
constructor();
constructor(parent: NodeWidget<any>);
constructor(parent?: NodeWidget<any>) {
let native;
if (parent) {
native = new addon.QTableView(parent.native);
} else {
native = new addon.QTableView();
}
super(native);
this.native = native;
parent && this.setNodeParent(parent);
}
}
export type QTableViewSignals = QAbstractItemViewSignals;