View Full Version : positioning a window at a specific screen position
nupul
29th March 2006, 16:25
Hey is it possible to always position the window at a predefined location on the screen viz.
left, right, top and bottom, in Qt4?
Also could any one also help me understand the alignment flags in Qt viz
Qt::Alignleft, Qt::AlignBottom etc....where does one use them???
:confused:
thanks
Nupul
drkbkr
29th March 2006, 16:30
The setGeometry function in QWidget might be what you're after. It allows you to set the x, y coordinates for the top left corner of your window as well as the size of the window.
zlatko
29th March 2006, 16:38
Also could any one also help me understand the alignment flags in Qt viz
Qt::Alignleft, Qt::AlignBottom etc....where does one use them???
:confused:
l
For example aligning text in some widgets
jpn
29th March 2006, 20:21
See QDesktopWidget (http://doc.trolltech.com/4.1/qdesktopwidget.html#details) and Window Geometry (http://doc.trolltech.com/4.1/geometry.html).
The former provides you access to screen information (amount, size..) and the latter gives you hints in positioning widgets.
You can't use aligment flags for this purpose.. ;)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.