On 04.Aug 2005 - 12:54:54, Leo Spalteholz wrote:
> I notice that if I create a Mainwindow in Qt Designer, I am able to
> position buttons anywhere, and also overlap them. Does anyone know
> how to do this in code? How do I add a widget at any pixel location?
> So far I've only been able to add widgets to layouts.


Don't use a layout, i.e. create a widget as container and new subwidgets
witht the container as parent. Then you can use QWidget::move() to
move the widget to the position you want it to have and use
QWidget::resize() to change its size. I have not looked into the source,
but the Layouts do it the same way, only that they use calculated values
for both such that the widgets "look nice"...

Andreas

-- =

What happened last night can happen again.
=

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=

e <<