Get current window size

  • Hi all,

    I need to get current size of window. User can resize this application as he wants, so I have to resize some pictures in it. Do you have any idea how to do it?

    Thanks for answering

  • Moderators

    You can use QWidget's "size() property": on the root widget of the window. You can also use resizeEvent handling or layouts managers, or any other number of other methods, but it really depends on the logic of what kind of work you have to do. I'd suggest doing some searching for tips on how to resize content in a window. There are a lot of examples available.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.