winteralfs
winteralfs

Reputation: 519

PySide moving one window to the screen location of another window

I would like to get the screen location of one window, and then take those coordinates and move another window to that location. Thanks.

Upvotes: 0

Views: 158

Answers (1)

noEmbryo
noEmbryo

Reputation: 2231

Just for the position, you can get the position of the first window:

    pos = self.first.pos().toTuple()

and move the second one there:

    self.second.move(*pos)

You can do the same with its size:

    size = self.first.size().toTuple()
    self.second.resize(*size)

Upvotes: 1

Related Questions