ladiesfinger
28th December 2010, 14:48
I'm using PyQt .
I had two comboboxes . First combobox has seven commands as text . Each command has its own options . ( i'll put options in the second combobox )
if user clicks commands combobox , then only the second combobox should appear with appropriate options loaded on it.
To do this action , i've tried to connect the 'changing' event with the function that implements the second combobox .
But , the function doesn't get invoked ..... ( i can't figure out what problem is )
i'll paste the code here :
self.connect(self.command,QtCore.SIGNAL('editTextC hanged()'),self.optionopen)
called function :
def optionopen(self):
self.optionlab=QtGui.QLabel('Option:',self)
self.loc.addWidget(self.optionlab,4,10)
self.option=QtGui.QComboBox(self)
self.loc.addWidget(self.option,4,14)
self.option.insertItems(268,list)
self.setLayout(self.loc)
I've tried out following functions:
changeEvent()
activated()
currentIndexChanged()
and finally
editTextChanged()
Plz , help me out .....
Any suggestions are welcome....
I had two comboboxes . First combobox has seven commands as text . Each command has its own options . ( i'll put options in the second combobox )
if user clicks commands combobox , then only the second combobox should appear with appropriate options loaded on it.
To do this action , i've tried to connect the 'changing' event with the function that implements the second combobox .
But , the function doesn't get invoked ..... ( i can't figure out what problem is )
i'll paste the code here :
self.connect(self.command,QtCore.SIGNAL('editTextC hanged()'),self.optionopen)
called function :
def optionopen(self):
self.optionlab=QtGui.QLabel('Option:',self)
self.loc.addWidget(self.optionlab,4,10)
self.option=QtGui.QComboBox(self)
self.loc.addWidget(self.option,4,14)
self.option.insertItems(268,list)
self.setLayout(self.loc)
I've tried out following functions:
changeEvent()
activated()
currentIndexChanged()
and finally
editTextChanged()
Plz , help me out .....
Any suggestions are welcome....