Add some missing geometry methods to QWidget
This commit is contained in:
parent
c26a194694
commit
080bb3626d
@ -106,6 +106,9 @@ export abstract class NodeWidget<Signals extends QWidgetSignals> extends YogaWid
|
||||
const preparedSheet = prepareInlineStyleSheet(this, style);
|
||||
this.native.setStyleSheet(preparedSheet);
|
||||
}
|
||||
frameGeometry(): QRect {
|
||||
return QRect.fromQVariant(this.property('frameGeometry'));
|
||||
}
|
||||
setGeometry(x: number, y: number, w: number, h: number): void {
|
||||
this.native.setGeometry(x, y, w, h);
|
||||
}
|
||||
@ -295,6 +298,12 @@ export abstract class NodeWidget<Signals extends QWidgetSignals> extends YogaWid
|
||||
clearFocus(): void {
|
||||
this.native.clearFocus();
|
||||
}
|
||||
x(): number {
|
||||
return this.property('x').toInt();
|
||||
}
|
||||
y(): number {
|
||||
return this.property('y').toInt();
|
||||
}
|
||||
}
|
||||
|
||||
export interface QWidgetSignals extends QObjectSignals {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user