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

Caret disappear on QLineEdit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.0
    • None
    • Windows 10
    • Windows

    Description

       When I apply transparent background to QLineEdit and also apply QGraphicsDropShadowEffect, makes the caret disappears:
       

       

       

      How to reproduce:

      auto lineEdit = new QLineEdit(this); 
      lineEdit->setStyleSheet("background-color: rgba(0, 0, 0, 155); color: white;"); 
      lineEdit->setGeometry(100, 30, 200, 80); 
      
      QGraphicsDropShadowEffect * eff = new QGraphicsDropShadowEffect();   
      eff->setBlurRadius(20);    
      eff->setOffset(0);     
      eff->setColor(0xb2003b);    
      lineEdit->setGraphicsEffect(eff);

       

      Some things I noted:

       

      Changing the background-color to 0, 0, 0, 255 and applying the shadow effect the caret returns.

      As soon I drop the alpha to 240- the caret disappears.

      Selecting the text from right to left the caret also returns, but very bugged like seen in the gif.

       

      Attachments

        1. image-2022-12-04-03-17-36-289.png
          67 kB
          caio cesar
        2. 2022-12-05_14-31-02.gif
          63 kB
          caio cesar
        For Gerrit Dashboard: QTBUG-109173
        # Subject Branch Project Status CR V

        Activity

          People

            morteza.jamshidi Morteza Jamshidi
            cesa caio cesar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change