Qt widget not updating
A widget that is not embedded in a parent widget is called a window.Usually, windows have a frame and a title bar, although it is also possible to create windows without such decoration using suitable set the title bar and icon respectively.The QPixmap class is an off-screen image representation that can be used as a paint device.Qt provides four classes for handling image data: QImage, QPixmap, QBitmap and QPicture.However, there are two situations where we need to create a custom view.One is where we want to present the data in a radically different way from how Qt's standard views present data, and the other is where we want to visualize two or more data items combined in some way.
The widget is the atom of the user interface: it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen.Constructs a widget which is a child of parent, with the name name. You can use a scaling factor for your objects as well as you can draw the objects with one scale and look at the objects with different scales.The default visible area is between ranges xmin = -1, xmax = 1, ymin = -1, ymax = 1. Also there is a possibility to tell the widget that you want that the visible area should be mapped to a certain interval, and the widget adjust the scaling factor according to that.If you lock the widget you should verify that you unlock it somewhere.The number of lock() calls should be the same with the number of unlock() calls. If you derive from Qt_widget you have to overload this function and put your code for drawing here if you don't use layers.