Exchange images at the same position
-
Hi,
in earlier days (VCL, C# Windows Forms) when I had to toggle between two images at the same location in a window I placed those two images at the very same location and toggled their visibility.
How would I achieve such behaviour with Qt?I just started programming with Qt and I cannot find any simple way :-( When I have a label with a pixmap, I cannot put two of them to the same position. At least the layout system in Qt Designer doesn't seem to allow this.
Even if I would think about resetting the pixmap (what would be the best way then?) I wonder how one can use overlapping elements.Thanks
Jeff -
You could use
QLabel.setPixmap(..)
And just use one label, no overlappingIf you want overlapping, a QGridLayout let you to have element on top of another.
Just insert them in the same row, column and toggle visibility of the one you needGood luck!