Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. OSX and QLineEdit height
Forum Updated to NodeBB v4.3 + New Features

OSX and QLineEdit height

Scheduled Pinned Locked Moved General and Desktop
osxqlinedit
1 Posts 1 Posters 889 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GraemeA
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved