Использую qt 4.6.2 под windows. Внутри QWidget вызываю geometry(по нажатии кнопки), она возвращает QRect(900, 329, 1022, 392), пробую spy(из ms visual) показывает rectangle: (900, 329)(1023, 393). В чем прикол?
Здравствуйте, jobdead, Вы писали:
J>Всем привет.
J>Использую qt 4.6.2 под windows. Внутри QWidget вызываю geometry(по нажатии кнопки), она возвращает QRect(900, 329, 1022, 392), пробую spy(из ms visual) показывает rectangle: (900, 329)(1023, 393). В чем прикол?
J>Спасибо.
1. Не факт, что geometry должно совпадать с размером физического окна ОС.
2. Попробуй frameGeometry().
Здравствуйте, jobdead, Вы писали:
J>Всем привет.
J>Использую qt 4.6.2 под windows. Внутри QWidget вызываю geometry(по нажатии кнопки), она возвращает QRect(900, 329, 1022, 392), пробую spy(из ms visual) показывает rectangle: (900, 329)(1023, 393). В чем прикол?
J>Спасибо.
Может это?
Note that for historical reasons the values returned by the bottom() and right() functions deviate from the true bottom-right corner of the rectangle: The right() function returns left() + width() — 1 and the bottom() function returns top() + height() — 1. The same is the case for the point returned by the bottomRight() convenience function. In addition, the x and y coordinate of the topRight() and bottomLeft() functions, respectively, contain the same deviation from the true right and bottom edges.
G>Может это?
G>Note that for historical reasons the values returned by the bottom() and right() functions deviate from the true bottom-right corner of the rectangle: The right() function returns left() + width() — 1 and the bottom() function returns top() + height() — 1. The same is the case for the point returned by the bottomRight() convenience function. In addition, the x and y coordinate of the topRight() and bottomLeft() functions, respectively, contain the same deviation from the true right and bottom edges.