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

Caret disappear on QLineEdit

XMLWordPrintable

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

       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.

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes