2

I am using PyQt to make a GUI for a circuit simulator, and am programmatically creating and deleting tabs (i.e. the user clicks on a button, and a new tab is added to a QTabWidget).

This is already working (I drew a QFrame in Qt Creator and, in my code, add it as a new tab), but I need to refer to a widget which is inside a specific tab (e.g. a QwtPlot inside the 3rd tab). How can this be achieved?

Daniel Hedberg
  • 5,677
  • 4
  • 36
  • 61
Renan
  • 462
  • 7
  • 24

1 Answers1

3

You can retrieve the widget from a specific tab by calling QTabWidget.widget(index).

ekhumoro
  • 115,249
  • 20
  • 229
  • 336
reclosedev
  • 9,352
  • 34
  • 51