Guest User

Untitled

a guest
Mar 22nd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. from PyQt5 import QtWidgets
  2.  
  3.  
  4. class MainWindow(QtWidgets.QDialog):
  5.  
  6. def __init__(self, parent=None):
  7. super(MainWindow, self).__init__(parent)
  8. self.layout = QtWidgets.QVBoxLayout()
  9. self.table = QtWidgets.QTableWidget()
  10. self.layout.addWidget(self.table)
  11. self.setLayout(self.layout)
  12.  
  13. print(type(self.table))
  14. print(type(self.layout.itemAt(0)))
  15.  
  16.  
  17. if __name__ == "__main__":
  18. import sys
  19. app = QtWidgets.QApplication(sys.argv)
  20. form = MainWindow()
  21. form.show()
  22. app.exec_()
Add Comment
Please, Sign In to add comment