How to put a pixel on window?
Unsolved
Mobile and Embedded
-
@Wieland Thanks a lot for your help.. I succeeded to draw a point with this code but I have to draw a point whenever getting some datas from a USB device. but, I don't know how to raise paintEvent manually when I want.
It seems to be called when the widget showed but I don't know how to call paintEvent when I get a data from USB devie. pls help me again . thanks a lot.void Widget::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event);QPainter painter; painter.begin(this); painter.setPen(Qcloor(10,10,10); painter.drawPoint(10,10); painter.end();
}
-
Once you received new data and want the widget to be painted again just call this function on it:
[slot] void QWidget::update()
, see also: QWidget Class.