Board game in c++ using qt
As mentioned in my comment, it's not entirely clear what the purpose of this code is, beyond adding points to a vector. Given that, I see several things that I think could make this more clear.
Use Types
C++ is a strongly typed language and that not only gives you type safety, it also improves comprehension. The ultimate goal of this code appears to be to add several QPointfs to an array. But it's written with 3 different types to accomplish that job - whatever type x_pos and y_pos are (presumably float or double?), chars in the directions vector, and QPointf in the fieldPos vector. This is inefficient as the compiler will end up inserting a bunch of code to convert between types, but more importantly, it obscures what's happening.
I would declare directions like this:
std::vector&lt;QPointf&gt; directions { 
    QPointf( 1.0, -1.0), 
    QPointf( 1.0,  1.0), 
    QPointf(-1.0,  1.0), 
    QPointf(-1.0, -1.0) 
};

I would change x_pos and y_pos into a single QPointf. It implements operator+=() so you can work in a similar manner as you are currently.
In general, when you find yourself using std::pair, it's a good sign that you need to use a better type like some sort of point, (mathematical) vector, or size struct. Code that uses std::pair is very difficult to read because the members, first and second are meaningless names for whatever task your code is performing.
Put the Right Things Into the Array
It might be more clear to just make a longer array with the directions you actually want instead of all the various loops. For example, instead of cramming everything into 4 QPointfs and looping over them and flipping back and forth between x and y positions, just make the array have what you want in it:
std::vector&lt;QPointf&gt; directions { 
    QPointf( 1.0,  0.0), 
    QPointf( 0.0, -1.0), 
    QPointf( 1.0,  0.0), 
    QPointf( 0.0, -1.0),
    // etc.
};

This will eliminate the need for multiple loops and the need to check even or odd iterations, which allows you to do the following.
Use Range-based Looping
Rather than writing a loop based on the size of the directions array and then having magic numbers like 5 in your inner loops, you can use the new C++11 and later syntax for range-based looping:
for (auto nextPoint : directions)
{
    pos += nextPoint * offset;
    fieldPos.push_back(pos);
}

But of course, you're not multiplying them all by offset. So your vector may need to contain objects of a new type in it that's something like:
typedef struct Direction {
    QPointf direction;
    float offset;
} Direction;

I'd use better names than Direction and direction, but since I don't know what they represent, I can't. If it's for a player, then PlayerDirection, or whatever's appropriate. So the loop would be more like:
for (auto nextDir : directions)
{
    pos += nextPoint.direction * nextPoint.offset;
    fieldPos.push_back(pos);
}

It means you'll end up having a long declaration for the array, but it will make the code a lot simpler. You could even put the values into a data file and read them at runtime if you think they'll change in the future.