I've done what you told me but the scrollbars are not showing up. My code:
//my constructor
container
= new QWidget();
//the empty widget ui.scrollArea->setWidget(container); //that I add to my scrollArea
//this my text Edit's creation
txt
= new QTextEdit(container
);
//I create my textEdit and set its parent to the created widget connect(txt->document(), SIGNAL(contentsChanged()), this, SLOT(update_size()));
txt->installEventFilter(this);
txt
->setFont
(QFont("Times New Roman", fontSize
));
txt->setTextColor(fontColor);
txt->show();
//my constructor
container = new QWidget(); //the empty widget
ui.scrollArea->setWidget(container); //that I add to my scrollArea
//this my text Edit's creation
txt = new QTextEdit(container); //I create my textEdit and set its parent to the created widget
connect(txt->document(), SIGNAL(contentsChanged()), this, SLOT(update_size()));
txt->installEventFilter(this);
txt->setFont(QFont("Times New Roman", fontSize));
txt->setTextColor(fontColor);
txt->show();
To copy to clipboard, switch view to plain text mode
Bookmarks