需要 #include <QLabel>
label->setFrameShape(QFrame::Box); //设置边框
边框样式参看:https://www.cnblogs.com/liming19680104/p/10834523.html