hi,guys:
i receive some picture data from internet,and now want to display in a widget with my form.(ON RED HAT ENTERPRISE Linux 5.0)
the "widget" is inherited from QWidget, and use these code to attatch to the mainform:

ui->widget->setVisible(0); //a Widget to provide geometry
//define as : class WidgetVideoArea : public QWidget

videoarea = new WidgetVideoArea(this);
videoarea->setGeometry(ui->widget->geometry());
videoarea->show();

then ,i recevie data from thread1,and emit a signal to mainwindow,so the picture can update.

Qt Code:
  1. void MainWindow::updateVideo(QByteArray videobufs)
  2. {
  3. const char *data = videobufs.constData();
  4. QImage smage((uchar*)data,240,320,QImage::Format_RGB16);
  5. videoarea->setRepaintFlag(smage);
  6. videoarea->repaint();
  7. }
To copy to clipboard, switch view to plain text mode 
now it works.
But i think that will freeze GUI. so i create another thread,thread2, to update the picture separately.
the function updateVideo(QByteArray videobufs) above is set to "public",so i can use it in thread2.
However,when i do that, application output:

X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x0
QPixmap: It is not safe to use pixmaps outside the GUI thread
...............
so how can i update the widget in a thread? will these appear in embedded board?(i will port to ARM later).
i used this method in VisualC++ before, and had no problem.
thanks.