Hi,

I am using QT 4.2.2. I create a main winodw and in that window I place a tabwidget using QT designer and make the programe and it is working. I need a QGraphicsScence and a QGraphicsView. So add the following code in constructer after the
" setupUi(this); // this sets up GUI "
and Qt create the output.

My problum is that, when I change the tab or QTabWidget then, the QGraphicsView display on the screen. I need that view on the first tab of my QTabWidget. How can I do that?. And also I need to change the line color as red.

Please help me.....

code:
-----------------------

QGraphicsScene *scene1 = new QGraphicsScene(this);
QGraphicsView *view1 = new QGraphicsView(this);
scene1 = new QGraphicsScene(0,0,65,457);
view1->setScene(scene1);
view1->setGeometry(QRect(716, 118, 70, 462));

int x1, y1, x2, y2, t;
x1 = 0; y1=0; x2=100; y2=2, t=0;
//scene->setForegroundBrush(QColor(5, 25, 255, 127));
//scene->setBackgroundBrush(QColor(5, 25, 255, 127));
//QGraphicsLineItem *line = new QGraphicsLineItem( QLineF( 0,0, 100, 2 ) );
QGraphicsLineItem *line;// = new QGraphicsLineItem( QLineF( 0,0, 100, 2 ) );
for ( int a=0; a<100; a++) {
QGraphicsLineItem *line = new QGraphicsLineItem( QLineF( x1,y1, x2, y2 ) );
scene4->addItem(line);
t=x1; x1=x2; x2 = t;
y1= y2; y2= y2+6;
}

--------------------------------------------------------------------

Sabeesh