I am noticing some strange text insertion behavior to a QPlainTextEdit widget when using a stylesheet. I'd like to use a 'fixed' font in my stylesheet. when i do this, i see that the text i want inserted 'inject' is actually missing the 'nj' characters so i end up with 'i ect' in the widget. when i use 'Courier' instead of 'fixed' font-family in the stylesheet, all is well. could it be due to my font server or problem with my environment? i don't have ready access to test on another machine outside of my environment.

here's the code:

Qt Code:
  1. #include <QtCore>
  2. #include <QtGui>
  3.  
  4. //-----------------------------------------------------------
  5. // main
  6. //-----------------------------------------------------------
  7. int main (int argc, char* argv[]) {
  8.  
  9. QApplication app(argc, argv);
  10.  
  11. QMainWindow *main_window = new QMainWindow();
  12. main_window->setGeometry(100,100,800,600);
  13.  
  14. // if you use font-family: "Courier", output looks fine. only problematic
  15. // with "fixed"
  16. //
  17. app.setStyleSheet(
  18. "QPlainTextEdit{ font-family: \"fixed\"; }"
  19. );
  20.  
  21. QWidget *main = new QWidget();
  22.  
  23. QPlainTextEdit *text = new QPlainTextEdit();
  24.  
  25. QVBoxLayout *layout = new QVBoxLayout;
  26. layout->addWidget(text);
  27. main->setLayout(layout);
  28.  
  29. main_window->setCentralWidget(main);
  30.  
  31. // this should show 'i ect' in the text window
  32. // NOTE: 'nj' chars are simply not printed
  33. //
  34. text->appendPlainText("inject");
  35.  
  36. main_window->show();
  37.  
  38. return app.exec();
  39.  
  40. }
To copy to clipboard, switch view to plain text mode 

thoughts? sorry in advance if this is basic question.