Qt Code:
self.swInventory.setObjectName("swInventory") self.page.setObjectName("page") self.swInventory.addWidget(self.page) self.page_2.setObjectName("page_2") self.swInventory.addWidget(self.page_2)To copy to clipboard, switch view to plain text mode
This is code written by the designer for a stackedwidget. How can I write code like this that will loop and create a variable number of pages if I can't create the identifier names on the fly? The objectName is a string, so that is not a problem. Can I just use the same identifier (self.Page) with a different objectName for each page?
Bookmarks