Hi there,
how to iterate QStringList from a specific posistion to its end. Both examples don't work:
for (int i = 4; !stringlist[i].isNull(); i++){}
for (QStringList::iterator it
= stringlist.
at(4); it
!= stringlist.
end();
++it
) {}
QStringList stringlist;
for (int i = 4; !stringlist[i].isNull(); i++){}
for (QStringList::iterator it = stringlist.at(4); it != stringlist.end(); ++it) {}
To copy to clipboard, switch view to plain text mode
How its down right?
Hi there,
how to iterate QStringList from a specific posistion to its end. Both examples don't work:
for (int i = 4; !stringlist[i].isNull(); i++){}
for (QStringList::iterator it
= stringlist.
at(4); it
!= stringlist.
end();
++it
) {}
QStringList stringlist;
for (int i = 4; !stringlist[i].isNull(); i++){}
for (QStringList::iterator it = stringlist.at(4); it != stringlist.end(); ++it) {}
To copy to clipboard, switch view to plain text mode
How its down right?
Hi there,
how to iterate QStringList from a specific posistion to its end. Both examples don't work:
for (int i = 4; !stringlist[i].isNull(); i++){}
for (QStringList::iterator it
= stringlist.
at(4); it
!= stringlist.
end();
++it
) {}
QStringList stringlist;
for (int i = 4; !stringlist[i].isNull(); i++){}
for (QStringList::iterator it = stringlist.at(4); it != stringlist.end(); ++it) {}
To copy to clipboard, switch view to plain text mode
How its down right?
Added after 25 minutes:
Just found a solution for myself:
for (QStringList::iterator it
= stringlist.
begin()+4; it
!= stringlist.
end();
++it
) {
do something;
}
QStringList stringlist;
for (QStringList::iterator it = stringlist.begin()+4; it != stringlist.end(); ++it)
{
do something;
}
To copy to clipboard, switch view to plain text mode
Is this the easiest way to do this?
Bookmarks