Any file format that Qt can load should work. I chose a lovely spritesheet from OpenGameArt http://opengameart.org/content/twelve-16x18-rpg-sprites-plus-base....
You can zoom in and out of the image by
You can also pan the image using the mouse by holding down the right mouse button and SHIFT.
Set the grid up for 16x18 size sprites:
Set the marker by moving the mouse over the texture while holding down the left mouse button:
The marker is indicated by the dotted red line. Inside the marker we get a little preview of all the sprites that fit into the marker.
To align the marker with the pixel border, you can drag the marker around using the mouse. You can also use the input widgets on the left to set the marker and grid parameters.
We are finished with setting up the grid. Now it is time to create the sprites:
You can see that 12 sprites have been added to the spritelist.
To (re-)label several sprites at once, select them in the sprite list and pick "Rename selected sprite" in the context menu.
The re-labeled sprites:
The sprite list can be exported as an enum and written to a C/C++ header (.h) file. This is useful whem you want to refer to individual sprite numbers by their name from a C/C++ program.