How to use frameGeometry correctly?
-
I used setGeometry(QRect) to set windows, It worked.
But I want to move and set windows with window title.Then I try to use frameGeometry like:
window->frameGeometry().setX(rects.x()); window->frameGeometry().setY(rects.y()); window->frameGeometry().setWidth(rects.width()); window->frameGeometry().setHeight(rects.height()); or window->frameGeometry().setRect(rects.x(), rects.y(), rects.width(), rects.height());
They are not working.
-
I used setGeometry(QRect) to set windows, It worked.
But I want to move and set windows with window title.Then I try to use frameGeometry like:
window->frameGeometry().setX(rects.x()); window->frameGeometry().setY(rects.y()); window->frameGeometry().setWidth(rects.width()); window->frameGeometry().setHeight(rects.height()); or window->frameGeometry().setRect(rects.x(), rects.y(), rects.width(), rects.height());
They are not working.
@Qt_Andrew said in How to use frameGeometry correctly?:
frameGeometry()
It returns a copy of QRect - chaning copy will not have any effect.
-
@Qt_Andrew said in How to use frameGeometry correctly?:
frameGeometry()
It returns a copy of QRect - chaning copy will not have any effect.
-
@Qt_Andrew "But I want to move and set windows with window title" - if you want to move the whole application window you can't do it like this. I don't know if there is anything in Qt for that as it is the job of the window manager.
-
@Qt_Andrew "But I want to move and set windows with window title" - if you want to move the whole application window you can't do it like this. I don't know if there is anything in Qt for that as it is the job of the window manager.