alenn.masic
10th November 2012, 23:03
Hi all
I have one button and textEdit and when user press that button, ColorDialog should appear and using stylesheet selected color should apply to all text in textEdit. I made the following code:
QColor color = QColorDialog::getColor(Qt::black, this);
edit->setStyleSheet(color.name()); (edit is QTextEdit)
but it's not working, ColorDialog appears, and I select color, but text in textEdit remains as it is. Can someone help me with this.
I have one button and textEdit and when user press that button, ColorDialog should appear and using stylesheet selected color should apply to all text in textEdit. I made the following code:
QColor color = QColorDialog::getColor(Qt::black, this);
edit->setStyleSheet(color.name()); (edit is QTextEdit)
but it's not working, ColorDialog appears, and I select color, but text in textEdit remains as it is. Can someone help me with this.