Could you write some more about your window?
Are you using layout, which one if you do, how widgets are places on window(is your label topmost of leftmost, or is it placed elsewhere)?
and what is actual behavior?
Could you write some more about your window?
Are you using layout, which one if you do, how widgets are places on window(is your label topmost of leftmost, or is it placed elsewhere)?
and what is actual behavior?
See GrEEn (Graphics Effects Environment)
http://sourceforge.net/project/platf...roup_id=232746
a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).
Hi Mchara,
Thanks for your response.
My main layout is QVBoxLayout, this contains two QHBoxLayouts. The top QHBoxLayout contains QLabel which is a QPixmap. I crop this pixmap with mouse and I'd like it to stay in the top left corner of my window (whatever I do to it). When I crop my pixmap I use mapFromParent to get the local coordinates. If the pixmap jumps around in the window (while zooming or cropping) it's very difficult to keep the coordinates straight. That's why I'd like to nail the top left corner of my pixmap to the main window.
I know there might be other ways to reliably obtain the coorinates and fixing the pixmap may not sound critical for that but I'd really prefer this approach (the reason being that other changes will negatively affect the program of which the pixmap is part).
Thanks again.
so, u may try to set sizepolicies in a different way
i.e. QSizePolicy::Minimum in both directions shall keep widget's size expanded to whole free place in your window with pixmap in top-left corner (The widget,s size should be larger than pixmap's size).
You may also consider puting QLabel with pixmap into QScrollArea - you'll get automatically scrollbars if pixmap would be larger than widget.
See GrEEn (Graphics Effects Environment)
http://sourceforge.net/project/platf...roup_id=232746
a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).
Bookmarks