I just sent the following to the pyqt list:

QQQ
Setting the insertion point programmatically does not appear to "take"
until (approximately) the point at which a textChanged() signal is
generated.  The relevant code (simplified just a bit) is:

def setInsertPoint(self,i):
    w = self.widget
    g.trace(i,w)
    w.textCursor().setPosition(i)

def getInsertPoint(self):
    w = self.widget
    i = w.textCursor().position()
    g.trace(i,w)
    return i

As you can see, w does not report the new insertion point immediately:

getInsertPoint: 0  <PyQt4.QtGui.QTextEdit object at 0x017706A8>
setInsertPoint: 48 <PyQt4.QtGui.QTextEdit object at 0x017706A8>
getInsertPoint: 0  <PyQt4.QtGui.QTextEdit object at 0x017706A8> #
Oops.

I have confirmed this by stepping with pdb, so I am fairly confident
that there are no intervening calls to QTextEdit methods.

Is there a way to force QTextEdit to report the present cursor
position?  I have tried w.update.

Anything else I should know?
QQQ

The QTextEdit body pane will be unusable until this is resolved.

In the meantime, I'll try to fix the problems translating tk key names
in various widgets.  Alas, this problem above muddies the water
considerably...

Edward
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to