Maybe you would like to try a different way.
First you can generate an empty vector grid like a fishnet (Vector > Research Tools > Vector Grid (Output Grid as Polygons!)), then you can make a spatial join (Vector > Data Management Tools > Join Attributes by Location (Take summary of intersecting features! > you will need the COUNT Field in the result shape file).
If the Cell size of the fishnet is 1 sq km (1000 m x 1000 m), the result is in the attribute field "COUNT" (Count of points/sq km).
If you need a smaller cell size for the vector grid, you have to calculate the number of points/ sq km with the field calculator in a new column of the attribute table. For example, if the Cell size is 0,25 sq km (500 m x 500 m), you have to calculate the theoretical density for each cell: "COUNT" * 4 (0,25 sq km * 4 = 1 sq km).