如何将样式设置为QLayout

时间:2016-01-15 20:27:02

标签: css python-2.7 pyqt4

我正在尝试使用css将样式表添加到我的脚本中,一切看起来都不错但我无法将样式设置为QLayout。 我怎样才能改变它的背景颜色 这就是我所做的事情。

class cleanWysiwyg
{
    private $allowTags = array('b','i','u');
    private $purifier;

    public function __construct()
    {
          $config = HTMLPurifier_Config::createDefault();
          $config->set('HTML.AllowedElements', $this->allowTags );
          $this->purifier = new HTMLPurifier($config);
    }

      public function cleanup ( &$dirty )
      {

        if ( !is_array($dirty) )
          {
        /*do this to prevent some clever workarounds enabled by wysiwyg or bored coders*/
        $dirty = htmlspecialchars_decode($dirty, ENT_HTML5); 
            $dirty = $this->purifier->purify( $dirty );
            return;
          }
          /*if we have an array we call ourselfes for each element*/
        foreach ( $dirty as &$element ){
          $this->cleanup($element);
        }
      }
}

程序正在运行,没有错误 并且所有更改都发生,除了QVBoxLayout,它仍然是默认的

0 个答案:

没有答案