title: PyQt - Change the color of a QLineEdit if it has no text
body: <p>Is it possible to change a <code>QLineEdit</code> background color depending on if it has text written inside it, using just only its stylesheet?</p>
  
  <p>This could be done using Python code, of course, but I was wondering if it could be done using a css property. </p>
  
  <p>My ideal scenario:</p>
  
  <p>CSS</p>
  
  <pre><code>QLineEdit {
      background-color: white;
  }
  
  QLineEdit:no-text-inside-it {
      background-color: red;
  }
  </code></pre>
  
  <p>Quick side note - According to the answer to this SO post: <a href="https://stackoverflow.com/questions/14681548/changing-the-color-of-qlineedits-placeholder-text">Changing the Color of QLineEdit&#39;s Placeholder Text</a>, the placeholder can't be modified directly so it looks like <code>QLineEdit</code> may not have this level of functionality. But I know that some adjustments to placeholders were made in Qt 4.7, so may be that's a way, now</p>
  
  <p>That said, anyone know if what I'm looking for is possible?</p>