void PreviewWnd::paintEvent(QPaintEvent* ev)
{
    //从QWidget派生的窗口,如果要使用stylesheet,必须要重载paintEvent,并在函数中写如下代码
    QStyleOption opt;
    opt.init(this);
    QPainter p(this);
    style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}