First of all use "the proper way" of dealing with copy/paste which is using QAbstractItemModel::mimeData(). As for the problem with ordered items, either just reorder the items or find the minimum and maximum values for row/column and encode the range of items they hold. The first idea will work properly with multiple selections, but the second one should be easier/faster (and will work for extended selection as well).
Bookmarks