title: How to indent the title of a QDockWidget using my own style
body: <p>I want to indent the title of a QDockWidget w/o adding spaces.</p>
  
  <pre><code>#include &lt;QStyle&gt;
  #include &lt;QProxyStyle&gt;
  #include &lt;iostream&gt;
  
  class my_style : public QProxyStyle
    {
  
    Q_OBJECT
  
    public:
      my_style (QStyle* style = 0) :
          QProxyStyle (style)
        {
        }
      virtual ~my_style ()
        {
        }
  
      virtual QRect subElementRect (SubElement element, const QStyleOption * option, const QWidget * widget = 0) const
        {
          QRect rect = QProxyStyle::subElementRect (element, option, widget);
          if (element == QStyle::SE_DockWidgetTitleBarText)
            {
              rect.adjust (50, 0, 0, 0);
            }
          //std::cerr &lt;&lt; "debug:" &lt;&lt; element &lt;&lt; std::endl;
          return rect;
        }
    };
  </code></pre>
  
  <p>I have no clue why but when I apply my style it's never running into that <strong>if</strong>. If I debug the method I only get an output for two different elements which are the buttons in the title bar.</p>