PDA

View Full Version : X and Y position of QWidget



bear101
22nd May 2009, 23:21
Hi

I'm trying to find x and y coordinate of a combobox. On the following picture I would like to find the length (x-coordinate) of the red line. When I call x() on the combobox it returns the length of the blue line.

3290

Do I have to go though all the parents to find the coordinate (length of the red line)?

-- Bjoern

faldzip
22nd May 2009, 23:27
use QWidget::mapTo() method with the widget argument being your main window.