Error [for the type QPlainTextEdit]

Reply

Join Date: Dec 2008
Posts: 16
Reputation: kjiu is an unknown quantity at this point 
Solved Threads: 0
kjiu kjiu is offline Offline
Newbie Poster

Error [for the type QPlainTextEdit]

 
0
  #1
21 Days Ago
Hello,

I have the code:

  1. public void color()
  2. {
  3. QColor color = QColorDialog.getColor(textEdit.textColor(), this);
  4. if (!color.isValid())
  5. return;
  6. editor.setTextColor(color);
  7. }
  8. private void setupEditor()
  9. {
  10. QFont font = new QFont();
  11. font.setFamily("Arial");
  12. font.setFixedPitch(true);
  13. font.setPointSize(10);
  14.  
  15. editor = new CodeEditor();
  16. editor.setLineWrapMode(QPlainTextEdit.LineWrapMode.NoWrap);
  17. editor.setFont(font);
  18.  
  19. new Highlighter(editor.document());
  20. }
but the error is :

The method setTextColor(QColor) is undefined for the type QPlainTextEdit

Why ?
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC