Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Haw I can improve Project Explorer?



  • I wish to do possible drag and drop files in Project Explorer in mode File System from one folder to another. It can rename files, but not move to other folder. Inspect sources https://github.com/qt-creator/qt-creator/tree/master/src/plugins/projectexplorer
    I found it start from ProjectExplorerPlugin::handleRenameFile

    Tell me it right or I need different way? May be I have make new plugin without change existing?
    And are there any addition advice?

    =====
    At now, I figured out:

    1. edit mode sets in FolderNavigationWidget::editCurrentItem,
    2. after that occur FolderNavigationModel::setData,
    3. and farther it call QFileSystemModel::setData that do not enable rename with change folder.

  • Lifetime Qt Champion

    Hi @iss7gli7,

    It can rename files, but not move to other folder. Inspect

    As renaming and moving is the same operation (as long as you stay on the same filesystem), you can move files by using rename and give a new path, keeping the same file name.

    I already did this with ProjectExplorer.

    Regards


Log in to reply