Hello!
I have two labels, one is a child of another and both are the SAME SIZE:
greenLabel
= new QLabel(pixmapLabel
);
myLayout->addWidget(pixmapLabel);
//I don't add greenLabel (the child) to any layout
pixmapLabel = new QLabel;
greenLabel = new QLabel(pixmapLabel);
myLayout->addWidget(pixmapLabel);
//I don't add greenLabel (the child) to any layout
To copy to clipboard, switch view to plain text mode
I want to display one over the other, so I do:
pixmapLabel->setPixmap(picture);
greenLabel->setPixmap(green_picture);
pixmapLabel->setPixmap(picture);
greenLabel->setPixmap(green_picture);
To copy to clipboard, switch view to plain text mode
1) Although both pixmaps are the exact same size, they appear slightly offset when displayed one over the other. Why?
2) When I change the size of both of the pixmaps (again they remain identical in size) and let addStretch push the parent label (pixmapLabel) to a slightly new location, the child won't move to the same location. Is this happening because the child pixmap is not attached to any layout? Is there a way to push the child widget with addStretch the same way as its parent.
Thank you much!
Bookmarks