[Interest] understanding QCompleter

Graham Labdon Graham.Labdon at avalonsciences.com
Fri Mar 28 15:59:46 CET 2014


Hi 
Please help to understand QCompleter 
Here is the code used to set up the completer
	m_completer = new QCompleter(this);
	m_fileSystemModel = new QFileSystemModel(m_completer);
	m_fileSystemModel->setRootPath("");
	m_completer->setModel(m_fileSystemModel);
	m_completer->setCompletionMode(QCompleter::PopupCompletion);
	m_completer->setMaxVisibleItems(10);
	m_completer->setWrapAround(true);
	ui.lineEdit->setCompleter(m_completer);

When I run this I seem to get inconsistent behaviour
At time the completion popup is not displayed 

Is there anything obviously wrong with my code or has anyone else any ideas as to why this happens

I have built the completer example supplied by Qt and the same behaviour happens





More information about the Interest mailing list