Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94824

In qlinedit, icon and text overlap

    XMLWordPrintable

Details

    • Linux/X11
    • 0e6b31019f01c72ea3af3de31095f8269c7d7f30 (qt/qtbase/dev) e8fbb9430ceff5a506388492539a33790b0e94b2 (qt/qtbase/6.2) 2cfdbd62be950a5b2c512d64d7dd6f7060c11f7a (qt/qtbase/6.1)

    Description

      [Code]

      #include "mainwindow.h"
      #include <QLineEdit>
      #include <QStyle>
      
      MainWindow::MainWindow(QWidget *parent)
          : QMainWindow(parent)
      {
          this->resize(500, 400);
          this->move(500, 400);
          QLineEdit *edit = new QLineEdit(this);
      
          edit->addAction(style()->standardIcon(QStyle::SP_FileIcon), QLineEdit::ActionPosition::LeadingPosition);
      
          edit->resize(200, 40);
          edit->move(150, 150);
          edit->setPlaceholderText("hello");
          edit->setClearButtonEnabled(true);  // ئۇيغۇر تىلى   //abcd...
      }
      

       

      [Steps]

      1.  Type some characters
      2.  Then you'll see that the overlap of Icon and text will occur in QLineedit.

      [Hope]

      • Icon and Text are in their correct postion.

      [Tips]

      Attachments

        1. mouse&keyboard.mp4
          2.33 MB
        2. new bug.mp4
          513 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-94824
          # Subject Branch Project Status CR V

          Activity

            People

              vhilshei Volker Hilsheimer
              fanruijie Alan Fan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: