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?

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?
