944,117 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 396
  • Java RSS
Nov 3rd, 2009
0

Error [for the type QPlainTextEdit]

Expand Post »
Hello,

I have the code:

Java Syntax (Toggle Plain Text)
  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 ?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kjiu is offline Offline
16 posts
since Dec 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: How to use Binary Search Tree with String? Is there any ready code?
Next Thread in Java Forum Timeline: Dumb NetBeans IDE question: I've lost my palette!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC