QLayout: Attempting to add QLayout “” to QWidget “”, which already has a layout
问题 I want to create some tabs, and I read this answer: How to add a tab in PySide I use the code in the answer and made some changes. Cause my code has to read some files and get the name of my tabs from those file, so that I add a for loop in my code. And here is my code. from PySide import QtCore, QtGui import sys import dflash_controller as con if __name__ == "__main__": list = [['a', 3], ['b', 4], ['c', 5], ['d', 6]] app = QtGui.QApplication(sys.argv) wid = QtGui.QWidget() grid = QtGui