QStringList : Can't access to member functions
-
Hi,
That's a bit vague as a question. What member function can't you access ?
By the way, what version of Qt are you using ?
On what platform ? -
Can you show a sample code that triggers this as well as the exact error message ?
-
@SGaist
(Sorry if my english is bad, it's not my mother language)void FenServeur::recuperationPseudo(const QString &message, client *emetteur) { QRegularExpression patternPseudo(">(.+)<"); QRegularExpressionMatch match = patternPseudo.match(message); if (match.hasMatch()) { const QString matched = match.captured(1); // matched == "pseudo" emetteur->setPseudo(matched); pseudosListe << matched; pseudosListe.sort(); pseudosListe.removeDuplicates(); } }
There is no error, it compile...
it's just , that do nothing.in Qt when you start to type a function it show you a list of functions that you can use, the public functions of QStringList are not in.
and of course if i write the entire name of the function it's not colored so i presume it's not recognized.
but when i run minGW there is no warning, error etc but the function don't work at the execution like sort() don't sort the list.
-
If it compiles then there's no problem code wise.
The fact that is "doesn't do anything" is highly suggestive. How do you know it "doesn't do anything" ? How do you know the list is not sorted ? What does
message
contain ? -
I know it because i can see it in a QTextEdit at the axecution that it is not sorted.
"Message" contain the name and message comming from a client.
The code that i have wrote is in the server code.
This code take the name from the message and put it in a QStringList.Edit: You were right, i am a big idiot, the list is sorted i'm confused.
Thank you for wasting your time on this !