Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PyQt5 import QtWidgets
- class MainWindow(QtWidgets.QDialog):
- def __init__(self, parent=None):
- super(MainWindow, self).__init__(parent)
- self.layout = QtWidgets.QVBoxLayout()
- self.table = QtWidgets.QTableWidget()
- self.layout.addWidget(self.table)
- self.setLayout(self.layout)
- print(type(self.table))
- print(type(self.layout.itemAt(0)))
- if __name__ == "__main__":
- import sys
- app = QtWidgets.QApplication(sys.argv)
- form = MainWindow()
- form.show()
- app.exec_()
Add Comment
Please, Sign In to add comment