Hi, I wrote code to generating simple form:
dialogWindow->setWindowTitle("Adding text");
dialogWindow->setFixedSize(350, 200);
QPlainTextEdit *text = new QPlainTextEdit();
layout->addWidget(text);
layout->addWidget(buttonBox);
dialogWindow->setLayout(layout);
dialogWindow->connect(buttonBox, SIGNAL(accepted()), dialogWindow, SLOT(accept()));
dialogWindow->connect(buttonBox, SIGNAL(rejected()), dialogWindow, SLOT(reject()));
QDialog *dialogWindow = new QDialog(this);
dialogWindow->setWindowTitle("Adding text");
dialogWindow->setFixedSize(350, 200);
QGridLayout *layout = new QGridLayout(dialogWindow);
QPlainTextEdit *text = new QPlainTextEdit();
QDialogButtonBox *buttonBox = new QDialogButtonBox(dialogWindow);
buttonBox->addButton(QDialogButtonBox::Ok);
buttonBox->addButton(QDialogButtonBox::Cancel);
layout->addWidget(text);
layout->addWidget(buttonBox);
dialogWindow->setLayout(layout);
dialogWindow->connect(buttonBox, SIGNAL(accepted()), dialogWindow, SLOT(accept()));
dialogWindow->connect(buttonBox, SIGNAL(rejected()), dialogWindow, SLOT(reject()));
To copy to clipboard, switch view to plain text mode
But, I didn't know how to write method onTextChanged to QPlainTextEdit object? Any ideas?
Bookmarks