hi, the problem is that i have a page in within a stacked widget which won't show the first two widgets, maybe i've missed something in the docs or the forums:
QLabel *label = new QLabel(this);
label->setText("Compare Versions");
label->setFont(QFont("System", 12, QFont:: DemiBold));
label->setAlignment(Qt::AlignCenter);
QFile file0("in.txt");
if (!file0.open(QIODevice::ReadOnly | QIODevice::Text))
return;
QTextStream in0(&file0);
QString line0 = in0.readAll();
QTextEdit *editor0 = new QTextEdit(this);
editor0->setFontPointSize(16.0);
editor0->setFontWeight(QFont:: DemiBold);
editor0->setPlainText(line0);
QFile file1("ain.txt");
if (!file1.open(QIODevice::ReadOnly | QIODevice::Text))
return;
QTextStream in1(&file1);
QString line1 = in1.readAll();
QTextEdit *editor1 = new QTextEdit(this);
editor1->setFontPointSize(16.0);
editor1->setFontWeight(QFont:: DemiBold);
editor1->setPlainText(line1);
QSplitter spl(Qt::Vertical, this);
spl.addWidget(editor0);
spl.addWidget(editor1);
QVBoxLayout *glayout = new QVBoxLayout(this);
glayout->addWidget(&spl);
glayout->addWidget(label);
setLayout(glayout);
the label show()s, but not the editors. thanx.
Bookmarks