[quote author="betmens" date="1333654853"]It's impossible :)
[/quote]
Yes, it's possible! ;)
You must iterate through list from the end to the begining.
Here is the example (maybe will be useful for somebody, if it's to late for you):
@
QStringList list_default, list_user;
int i, n, from, to;
list_default<<"0"<<"1"<<"2"<<"3";
list_user<<"2"<<"0"<<"3"<<"1";
n = list_user.count() - 1
for (i = n; i > -1; i--) {
list_element = list_user[i];
to = i;
from = list_default.index(list_element);
list_default.insert(to, list_default.pop(from)); // keep default list consistent
tb_main->moveTab(from, to);
}
@
Sorry for the possible program syntax errors (line 11 maybe), in above example - most time I programming in PyQt, so I am not much familiar with C++ & Qt...