Important: Please read the Qt Code of Conduct -

OSX and QLineEdit height

  • The following code:

    int main(int argc, char** argv)
      QApplication app(argc,argv);
      app.setStyleSheet("QLineEdit  { font-size : 40px }");
      QMainWindow mw;
      QWidget * w = new QWidget;
      QLineEdit * edit1 = new QLineEdit;
      QVBoxLayout * layout = new QVBoxLayout;
      return app.exec();

    When built on OSX Mountain Lion, the height of the QLineEdit does not adjust for the height of the text (which is therefore not all visible).

    On FreeBSD (and Linux) it does automatically adjust.

    Is there something else I should be doing on OSX to get the same behaviour?

Log in to reply