COMC 2011 A Problem 4

In the figure, A Q P B and A S R C are squares, and A Q S is an equilateral triangle. If Q S=4 and B C=x, what is the value of x?