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;
      layout->addWidget(edit1);
      w->setLayout(layout);
      mw.setCentralWidget(w);
      edit1->setText("Hello");
      mw.show();
      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
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.