Question

How does one use QFileSystemModel in the context of a QCompleter? It looks like a better choice than QDirModel as it is non UI-blocking. The following snippet doesn't seem to do anything.

QLineEdit* l = new QLineEdit ;
QCompleter* c = new QCompleter ;
QFileSystemModel* m = new QFileSystemModel ;
m->setRootPath( "c:\\" ) ;
c->setModel( m ) ;
l->setCompleter( c ) ;
Was it helpful?

Solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top