Using Python 2.7.2 and pyQT... This is the only forum I can get to from work. (Thank You NMCI!)

I have a pop-up with 10 Buttons and a QLineEdit.

I did not set any Masks or Validators when I constructed the GUI in QTDesigner.

The "returnPressed" signal works.

I can not get the "textEdited" signal to work at all, period.

I come from a VB-6 background and the reference to (const QString&) in void textEdited (const QString&) has me completely "snowed".

What I want to do is get the length of the entered text as it changes and update a characters-remaining count for the user.

Of course if I can't get a signal emitted when each character is typed, I can't do that...

Help!

THANKS!

Qt Code:
  1. class Oper_Comnt(QDialog, ui_OpComnt.Ui_OpComnt):
  2. """
  3. This Class creates an instance of the ui_OpComnt.Ui_OpComnt pop-up
  4. Dialog used for Displaying/Receiving Operator Comments.
  5. """
  6. def __init__(self, text, NumChars=255, parent=None):
  7. super(Oper_Comnt, self).__init__(parent)
  8. self.__index = 0
  9. self.setupUi(self)
  10. self.setModal(True)
  11. self.NumChars = NumChars
  12.  
  13. # Set up events for Button Clicks
  14. Selection=[]
  15. for i in range(10):
  16. Selection.append(getattr(self, "Comment_%d" %(i+1)) )
  17. self.connect(Selection[i],SIGNAL("clicked()"),
  18. self.comment_click)
  19.  
  20. self.connect(self.lineEdit,SIGNAL("returnPressed()"),self.usr_enter)
  21.  
  22. self.connect(self.lineEdit,SIGNAL("textEdited()"),self.new_char)
To copy to clipboard, switch view to plain text mode