[QScintilla] Problem with calltips of last QScintilla2 snapshot

Detlev Offenbach detlev at die-offenbachs.de
Tue Apr 10 16:22:02 BST 2007


On Dienstag, 10. April 2007, Phil Thompson wrote:
> On Tuesday 10 April 2007 3:36 pm, Detlev Offenbach wrote:
> > On Dienstag, 10. April 2007, Phil Thompson wrote:
> > > On Tuesday 10 April 2007 2:53 pm, Detlev Offenbach wrote:
> > > > Hi,
> > > >
> > > > calltips seem to not work like expected. On the first use of a
> > > > method, I receive a calltip. On the second, I don't. Type the
> > > > following into a QScintilla editor (e.g. in eric4)
> > > >
> > > > from PyQt4.QtCore import QString
> > > >
> > > > x = QString()
> > > > x.append(
> > > >
> > > > Calltips show up.
> > >
> > > I don't see how.
> >
> > I used auto-completion to enter 'append'.
> >
> > > > Complete it by typing
> > > >
> > > > "a")
> > > > x.append(
> > > >
> > > > At this point, no calltips are displayed.
> > >
> > > At the moment call tips can only be displayed after auto-completion has
> > > been used to identify the correct function/method.
> >
> > That means, I have to use the correct 'append' entry from autocompletion
> > first (e.g. for QString) in order to get the correct calltips. If I
> > select the wrong one (actually for me 'append' is 'append' no matter
> > where the auto-completion comes from), I get calltips for the wrong type,
> > which isn't shown in the calltips list. I think, this behavior is more
> > confusing than help.
>
> If there is more than one API entry for append then each will be shown in
> the list with additional context information for you to realise which is
> which. Auto-completion and call tips only work effectively if QScintilla
> knows (ie. is told by the user) the relevant API entries it is supposed to
> be looking at.
>
> > > I could change it so that if this isn't the case then the call tips for
> > > all functions/methods called "append" are offered. This might be rather
> > > a lot if the method was "__init__".
> > >
> > > Phil
> >
> > I agree, this list could be long. How did calltips work in QScintilla1?
>
> It just used "append" and offered the call tips for every function/method
> in the API files with that name. Like I said I could change it to revert to
> that behaviour if it doesn't have any other information available to allow
> it to be more selective.
>
> Phil

I'd suggest the following behavior. If QScintilla has specific knowledge about 
the context, it should just show calltips for this specific context (that is 
what it does now). However, it should give the context, so that the user can 
check, if he used the "wrong" auto-completion (i.e. include a header saying 
e.g. "PyQt4.QtCore.QString"). If no specific knowledge is available, fall 
back to show all possibilities with context info (like auto-completion list). 
Maybe it is a good idea to make the calltips behavior configurable.

Is there a way to disable calltips without disabling auto-completion as well?

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the QScintilla mailing list