PyQt5 Function Parameter Declaration
-
addWidget
self.lcd = QLCDNumber() grid.addWidget(self.lcd,0,0,3,0) grid.setSpacing(10)
void QGridLayout::addWidget(QWidget * widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment = 0)
This is an overloaded function.
This version adds the given widget to the cell grid, spanning multiple rows/columns. The cell will start at fromRow, fromColumn spanning rowSpan rows and columnSpan columns. The widget will have the given alignment.
If rowSpan and/or columnSpan is -1, then the widget will extend to the bottom and/or right edge, respectively.
ps:起始行,起始列,占用行,占用列