guitargentlyweeps
12th March 2012, 19:13
Hi,
I've searched the forum and tried different things to solve this to no avail.
I have an application that shows a QDialog derived dialog from a QMainWindow derived class. I'm building on a mac with a high res display and the dialog shows fine. When I build on a linux box with a lower resolution display, the top and bottom of the dialog extends above and below the screen respectively. If I use setFixedSize() on my dialog I can display the whole thing on this lower res display fine but then I can't re-size if I want to. Also, this is a ham handed way of sizing a window. Obviously using setMaximumHeight() or setMaximumWidth() won't work because they just restrict re-sizing. How can I use the dimensions of my display, which I can retrieve with a call to availableGeometry(), to size my dialog properly? What function can I plug these values into to achieve this? What am I missing here, this should be simple.
Thanks for the consideration in advance. Much appreciated.
I've searched the forum and tried different things to solve this to no avail.
I have an application that shows a QDialog derived dialog from a QMainWindow derived class. I'm building on a mac with a high res display and the dialog shows fine. When I build on a linux box with a lower resolution display, the top and bottom of the dialog extends above and below the screen respectively. If I use setFixedSize() on my dialog I can display the whole thing on this lower res display fine but then I can't re-size if I want to. Also, this is a ham handed way of sizing a window. Obviously using setMaximumHeight() or setMaximumWidth() won't work because they just restrict re-sizing. How can I use the dimensions of my display, which I can retrieve with a call to availableGeometry(), to size my dialog properly? What function can I plug these values into to achieve this? What am I missing here, this should be simple.
Thanks for the consideration in advance. Much appreciated.