C++ (Qt) stuct PrefixRecord{ QString s1; QString s2;} QVector<PrefixRecord> *s = new QVector<PrefixRecord>;s->resize(1000);
C++ (Qt)QStringList list; list << "AlPha" << "beTA" << "gamma" << "DELTA"; QMap<QString, QString> map; foreach (const QString &str, list) map.insert(str.toLower(), str); list = map.values();
C++ (Qt)prefixRecords = new QVector<PrefixRecord>;// тут заполняем структуру QMap<QString, PrefixRecord> map; foreach (const PrefixRecord &p, prefixRecords) map.insert(p.s1, prefixRecords); prefixRecords = map.values();
C++ (Qt) for (int i = 0; i < list.size(); ++i) map.insert(list[i].toLower(), list[i]);
C# stuct PrefixRecord{ QString s1; QString s2;}............................ bool prefLessThan(const PrefixRecord &p1, const PrefixRecord &p2) { return p1.s1< p2.s1; } .............................QVector<PrefixRecord> *s = new QVector<PrefixRecord>;s->resize(1000); qSort(s->begin(), s->end(), prefLessThan);
C++ (Qt)while(!asleep()) sheep++;
C++ (Qt)struct PrefixRecord{ QString s1; QString s2;}; bool prefLessThan(const PrefixRecord &p1, const PrefixRecord &p2){ return p1.s1< p2.s1;} void Widget::on_pushButton_clicked(){ QVector<PrefixRecord> *s = new QVector<PrefixRecord>; s->resize(1000); qSort(s->begin(), s->end(), prefLessThan);}