Nice problem! I didn't think that was possible at first, but then I came up with this idea. For convenience in writing the formulas, it works on the unit square rather than on the square from –1 to 1.

Let P consist of the graph of the function together with the line segment from to , and let Q consist of the graph of the function together with the line segments from to and from to . Then P and Q are disjoint, connected (but not path-connected), P contains (0,1) and (1,0), and Q contains (0,0) and (1,1).