QCompleter on Plasma::LineEdit not working properly

Cyrill Helg phlogsmailinglists at gmail.com
Tue Jan 19 19:09:57 CET 2010


Hi

I tried it, but still the same behaviour. Btw, it locks after 2 chars and 
completes only on the first char (popup shown at wrong place..).


On Tuesday 19 January 2010 17:00:25 Hugo Pereira Da Costa wrote:
> Hi,
> 
> for a "shot in the dark" could you try with another style than oxygen
> (if its the one your using)
> or using oxygen by disabling the "animations" in the oxygen style
> configuration dialog
> ("configure" in systemsettings->appearance->style, next to the combobox)
> ? It might be responsible for the freeze.
> 
> Hugo
> 
> > Hi there
> > 
> > I'm working on a simple plasmoid that should be able to send sms over an
> > http gateway in the end :)
> > 
> > I want to fetch the contacts and their phone numbers from akonadi and use
> > autocompletion to let the user select it.
> > 
> > Now this is how I'm trying to do this:
> > 
> > m_numberEdit = new Plasma::LineEdit();
> > 
> > ---
> > //construct completer and attach it to the underlying native Widget of
> > the LineEdit
> > m_completer = new QCompleter(Akonadi::ContactCompletionModel::self(),
> > this);
> > 
> > m_completer->setCompletionColumn(
> > Akonadi::ContactCompletionModel::NameColumn );
> > m_completer->setCaseSensitivity(Qt::CaseInsensitive);
> > 
> > connect( m_completer, SIGNAL( activated( const QModelIndex&  ) ),
> > 
> > 			SLOT( slotCompletionCompleted( const QModelIndex&  ) ) );
> > 
> > m_numberEdit->nativeWidget()->setCompleter(m_completer);
> > ---
> > 
> > I changed the Akonadi::ContactCompletionMode (yes I need to change the
> > namespace..) for my needs, the cpp file can be found here if its
> > relevant: http://paste.pocoo.org/show/167143/
> > (Its almost the same used in group edit in new addressbook and working
> > there)
> > 
> > Now the problem is:
> > 
> > The completion stops after first char and the completion popup is shown
> > "somewhere" in the left top of the screen and not near my LineEdit. I
> > can't even delete the first char after typing, the whole LineEdit
> > somehow is freezed.
> > 
> > Am I doing this right by using the native underlying widget? Where could
> > the problem be? Is this is a Plasma bug?
> > 
> > 
> > Thanks a lot for your help
> > Cyrill
> > _______________________________________________
> > Plasma-devel mailing list
> > Plasma-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/plasma-devel
> 
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel


More information about the Plasma-devel mailing list