小编kuz*_*ich的帖子

如何使用Qt库(可能是qSort())对QList <MyClass*>进行排序?

class MyClass {
  public:
    int a;
    bool operator<(const MyClass other) const {
        return a<other.a;
    }
    ....
};
....
QList<MyClass*> list;
Run Code Online (Sandbox Code Playgroud)

c++ sorting qt

15
推荐指数
3
解决办法
3万
查看次数

标签 统计

c++ ×1

qt ×1

sorting ×1