Does (square-taper) BB spindle length affect Q factor?
Yes, spindle length is a factor in determining the Q factor. 

A longer spindle moves the cranks further out while a shorter one moves the cranks further in. The type of crankset will also affect the Q factor, as some will sit further out than others even with the same spindle length (I've seen cranks which on the same bottom bracket can have more than 1 cm difference in Q factor). 

Whether or not you can get the chainline and Q factor you want is a different matter (and dependent on your setup).