Python Gtk3 Entry set placeholder text
<p>I tried to set a grey italic placeholder text for Gtk.Entry but the entry is empty. Using Linux Mint 17.3 / Gtk Version 3.10.8</p>

<p>Whats wrong with this:</p>

<pre><code>#!/usr/bin/env python

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

window = Gtk.Window()
box = Gtk.Box()
window.add(box)

entry = Gtk.Entry()
box.add(entry)

entry.set_placeholder_text("Filter")

window.show_all()
Gtk.main()
</code></pre>

<p>From the docs:</p>

<blockquote>
  <p>Note that since the placeholder text gets removed when the entry received focus, using this feature is a bit problematic if the entry is given the initial focus in a window. Sometimes this can be worked around by delaying the initial focus setting until the first key event arrives.</p>
</blockquote>

<p>Try to add a button and give it focus, it should work.</p>

python gtk3