Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem implementing back function with QfileSystemModel and QlistView
Forum Updated to NodeBB v4.3 + New Features

Problem implementing back function with QfileSystemModel and QlistView

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gayandis
    wrote on last edited by
    #1

    Hi,

    I have implemented file system back button function with following
    @
    void Dialog:n_pushButton_pressed()
    {
    QModelIndex indexedit=ui->listView->currentIndex();
    QModelIndex indexparent=indexedit.parent();
    qDebug()<<indexedit;
    qDebug()<<indexparent;
    ui->listView->setRootIndex(indexparent);

    }@

    but this is the output which i have got
    @
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )
    QModelIndex(2,0,0x8920040,QFileSystemModel(0x87e00 a8) )
    QModelIndex(1,0,0x86da1b8,QFileSystemModel(0x87e00 a8) )

    @

    in here back key works only once then button wont update .please help me with this issue ...Thanks

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved