I have a PyQt Gui application that has multiple QDialog windows that I use to plot data using matplotlib widget. This is the code I'm using is below.
Only one emitted signal is caught. Which ever QDialog is created last catches it's emitted signal. If the TempBox
dialog is created last the NewTemp_signal
is caught, or if the RealBox
dialog is created last the NewReal_signal
is caught. But, the other signal is not caught. How do I catch both signals to update all dialogs? Thanks
Dialog window class
class GUIgraph(QtGui.QDialog):
def __init__(self,parent=None):
QtGui.QDialog.__init__(self,parent)
print 'This is the Histograph dialog class function'
self.graph = Ui_histogram_Dialog()
self.graph.setupUi(self)
Functions that create new windwos
def TempgraphFunc(self):
QtGui.QWidget.__init__(self,parent=None)
self.TempBox = GUIgraph()
self.TempBox.setWindowTitle("Temperature")
self.NewTemp_signal.connect(self.TempPlotFunc)
self.TempBox.show()
def RealgraphFunc(self):
QtGui.QWidget.__init__(self,parent=None)
self.RealBox = GUIgraph()
self.RealBox.setWindowTitle("Real Space")
self.NewReal_signal.connect(self.RealPlotFunc)
print 'Real is connected'
self.RealBox.show()
In another function I emit a signal
def loadFiles(self):
....
self.NewTemp_signal.emit()
self.NewReal_signal.emit()
print ' signals emitted'