引用楼主jiang_198586于2011-09-06 15:01发表的 求解决插入千行数据速度慢的代码 :
求解决插入千行数据速度慢的代码。。。。。。。急
我尝试使用过qtreeview+QSortFilterProxyModel+QStandardItemModel,插入5000行数据需要3s左右,我希望执行时间能达到1s以内。
我也试过自定义model,继承QAbstractItemModel类,添加insertRows方法,其中写入了beginInsertRows()方法和endInsertRows()方法,
运行时系统报beginInsertRows
()和endInsertRows
() is protected,出错! 希望有写过实现该功能代码的人士能给予帮助!
