Hi,
I have written this code in my class derived from QWidget,but it shows no text ..!!
class ProgressWidget
:public QWidget{
..
..
};
class ProgressWidget:public QWidget
{
..
QGraphicsTextItem *txt1;
..
};
To copy to clipboard, switch view to plain text mode
void ProgressWidget::instructionStringOne()
{
txt1->setPlainText(str1);
txt1->setFont(fontStr1);
txt1->setTextWidth(TEXT_WIDTH);
txt1->setPos(INSTRUCTION_TEXT_1_X,INSTRUCTION_TEXT_1_Y);
txt1->show();
}
void ProgressWidget::instructionStringOne()
{
txt1->setPlainText(str1);
txt1->setFont(fontStr1);
txt1->setTextWidth(TEXT_WIDTH);
txt1->setPos(INSTRUCTION_TEXT_1_X,INSTRUCTION_TEXT_1_Y);
txt1->show();
}
To copy to clipboard, switch view to plain text mode
should it work ot this is a mistake....i have also tried different values in setPos but it shows no text..
Bookmarks