Koen Deforche 3fb7e72b80 Several changes: %!s(int64=9) %!d(string=hai) anos
..
data 23c84d699e back-port WDialog fixes from v3 branch %!s(int64=16) %!d(string=hai) anos
icons d078beb917 see Changelog %!s(int64=16) %!d(string=hai) anos
CMakeLists.txt 9dd3f8912a see Changelog %!s(int64=14) %!d(string=hai) anos
CsvUtil.C 3fb7e72b80 Several changes: %!s(int64=9) %!d(string=hai) anos
CsvUtil.h 4fa78cecd6 Several updates: %!s(int64=11) %!d(string=hai) anos
FolderView.C ba46adce31 QNX build support %!s(int64=14) %!d(string=hai) anos
FolderView.h 23c84d699e back-port WDialog fixes from v3 branch %!s(int64=16) %!d(string=hai) anos
README.md 8455fb6ae2 added README.md files for examples, several bug fixes %!s(int64=13) %!d(string=hai) anos
TreeViewDragDrop.C 5079132ba7 Several changes: %!s(int64=10) %!d(string=hai) anos
about.xml 64684df250 see Changelog %!s(int64=15) %!d(string=hai) anos
styles.css 251a6cbc6a see Changelog %!s(int64=14) %!d(string=hai) anos

README.md

Treeview drag-drop example

The example shows a typical full-window application with a tree (a WTreeView) that represents different 'folders', and a table (a WTableView) which represents 'documents' that belong to this office. The size of these documents is shown in a pie chart (a WPieChart).

Two data models (WStandardItemModel) back these views: one for the folders, and one for the files.

Drag & Drop is configured so that files can be selected and dragged into a different folder. Changes to the model are automatically reflected in the relevant views.

How to run

See the README in the parent directory.

What it illustrates

  • Standard Item views and models
  • Drag & Drop with standard item models
  • Using a WPopupMenu
  • Using a dialog to edit data