Answer the question
In order to leave comments, you need to log in
[[+content_image]]
PyQt5. How to completely destroy a tab and its contents?
There is a qtabwidget.
There is a list of the form a[['file1', None]['file2', None]...] When the button is clicked, the list elements are dynamically filled and tabs are added
. I included the closable and movable options. How to throw out the tab and the widget contained in it on the tabCloseRequsted event?
I used to remove widgeta
а[i][1] = QTextEdit()
tabwidget.addtab(a[i][1], a[i][0])
a[i][1] = None
self.widget(i) = None
...
if a[i][1] not None:
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question