[Qt-interest] QFileSystemModel doesn't show anything

Benjamin Meyer ben at meyerhome.net
Mon Jun 1 16:32:12 CEST 2009


On Jun 1, 2009, at 2:20 AM, Eckhard Jokisch wrote:

> Hi,
> the followig code just presents an empty treeview and I can't figure  
> out why.
> The same done with QDirModel works just fine. What can I do?
>
> Eckhard
>
> MainWindow::MainWindow(QWidget *parent)
>    : QMainWindow(parent), ui(new Ui::MainWindowClass)
> {
>    ui->setupUi(this);
>
>    QFileSystemModel fsm;

Nothing wrong with QFileSystemModel, just your example.  Allocate the  
object on the heap not the stack.

-Benjamin Meyer



More information about the Qt-interest-old mailing list