It's not bad, the movement is smoother
I don't see how it can possibly be smoother. You assign again the mouse position to the coordinates, i.e. despite using
double the X and Y values are always integral. The fact that you call
move() instead of
setPosition() changes nothing, it only accumulates rounding errors.
And use vectors, not components -- that's why they exist. Then you don't have several useless calls to
sf::Mouse methods, either. Your first code can be written as:
sf::Vector2i pos = sf::Mouse::getPosition();
sprite.setPosition(static_cast<sf::Vector2f>(pos));
or alternatively:
sf::Vector2f pos(sf::Mouse::getPosition()); // explicit constructor converts int -> double
sprite.setPosition(pos);
Concerning your original question, are you sure that single pixel movement is really an issue? You cannot have higher resolution, the only thing that can be done is to display a pixel as a mix of multiple colors in the texture. That may look smooth in some cases, while in others it looks blurry and distorted.
In general, what do you expect as "smooth"? When you don't trace the cursor anymore, the application may quickly become user-unfriendly. Is your framerate just too low, leading to delayed or stuttering mouse movement?