Results 1 to 1 of 1

Thread: QFileSystemModel with Drag&Drop operations

  1. #1
    Join Date
    Feb 2011
    Location
    Saint-Petersburg
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileSystemModel with Drag&Drop operations

    Hello! Can you help me or give some advices?

    I need to use QTreeView with QFilesSytemModel and I want to enable drug&drop operations on files and folders( e.g. move one file to another folder or something like this ).

    For make it, I need to write new class which is inherited from QFileSystemModel class. And I need to reimplement some methods there, like:
    Qt::ItemFlags flags(const QModelIndex &index) const;
    Qt:ropActions supportedDropActions() const;
    Qt:ragActions supportedDragActions() const;

    But QFileSystem class doesn't allow to make inherited class, there are no virtual methods.
    What can I do in this situation? Rewrite new QFileSystemModel class or what?


    Added after 26 minutes:


    Sorry for this question, this methods are virtual. It has a virtual key word in QAbstractItemModel class, but i looked it for in QFileSystemModel class.
    Last edited by eklekt; 18th February 2011 at 08:01.

Similar Threads

  1. Replies: 2
    Last Post: 13th October 2010, 21:51
  2. Replies: 0
    Last Post: 20th July 2010, 14:55
  3. Replies: 3
    Last Post: 10th June 2010, 15:13
  4. Replies: 0
    Last Post: 4th May 2010, 10:24
  5. drag and drop
    By vijay anandh in forum Qt Programming
    Replies: 1
    Last Post: 11th April 2006, 11:23

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.