Will03uk
Will03uk

Reputation: 3444

How should I extracted this url get string

How should I extract a URL for example "action=add&var1=5&var2=6" into

QString action; 
QVector<QStringList> vars;

efficiently? I am using apache, c++ cgi and the QT libary. Ask for more detail if needed.

Upvotes: 1

Views: 170

Answers (1)

RedX
RedX

Reputation: 15185

Use the QUrl class that comes with Qt. Set it to the url and then use allEncodedQueryItemValues to get the pairs.

Upvotes: 1

Related Questions