Doing a "quick and nasty" the nuts retaining my milling vice alignment "goalpost" are merely two tapped thick discs, with flats milled on them, filling the bottom of the T slot..
But this is an almost unstressed application, to hold the close fitting bottom of the pillars to the table.
For more heavily loaded applications, I make "proper" T nuts, ensuring that the top of the nut is below the surface of the table, to ensure that it does indeed clamp whatever is above it.
Within reason, the longer the T nut, the greater the area of table carrying the clamping load.
My Rear Toolpost on the lathe is clamped by a T nut extending the full length of the slot in the Cross Slide, with a stud at each end.
It is a good idea to peen, or centre punch the bottom threads to prevent the stud or bolt being able to pass through the nut and forcing it upwards. This should prevent the top of the slot being broken away.
Howard