May 2019
Intermediate to advanced
542 pages
13h 37m
English
In MainWindow.__init__(), delete or comment-out the web view code you just added (going back to the creation of the QWebEngineView object). We're going to move that functionality to a method instead, so that we can create multiple web views in a tabbed interface. We will do this as follows:
self.tabs = qtw.QTabWidget( tabsClosable=True, movable=True) self.tabs.tabCloseRequested.connect(self.tabs.removeTab) self.new = qtw.QPushButton('New') self.tabs.setCornerWidget(self.new) self.setCentralWidget(self.tabs)
This tab widget will have movable and closable tabs, and a New button in the left corner for adding ...
Read now
Unlock full access