I’ve been banging my head about this seemingly easy task and I could really use some help.
I have a wide Image loaded in the gui (using the designer..) and I want to be able to draw only a portion of it, a rectangle.
I need to be able to change this rectangle position over the large image, in order to draw a different part of the larger image at will. In this process the rect must maintain its size.
Using the Ui::MainWindow object I’m able to access the label holding the image and a solution that involves using this option is preferred (in order to keep up with the rest of the code I’ve already written )
Any solution will be much appreciated 🙂
Thanks,
Itamar
I would definitely (for ease of use) just place an empty
labelas placeholder in Designer.Then implement the
paintEventfor this label (delegate it to your own method). You’ll have also have to look into QPainter, QPixMap, etc… Should be doable based on these hints and the documentation.If you want more, I suggest you provide a small code snippet to work upon.