ui->tabWidget->setStyleSheet("\
                                 QTabBar::tab {\
                                        color: rgb(84,2,119);\
                                        background-image: url(:/pics/wood.jpg); \
                                        border: 2px solid rgb(68,66,64);\
                                        border-bottom-color: rgb(68,66,64); \
                                        border-top-left-radius: 20px;\
                                        border-top-right-radius: 20px;\
                                        max-height: 21px;\
                                        min-width: 8ex;\
                                        padding: 2px;\
                                        } \
                                  QTabWidget::tab-bar {\
                                        alignment: center;\
                                        } \
                                  QTabBar::tab:!selected {\
                                        margin-top: 5px; \
                                        }\
                                  QTabBar::tab:selected {\
                                        color: rgb(255,0,128); \
                                        }\
                                  ");
有10个button,难道要ui->tabWidget->setStyleSheet 10次?
[ 此帖被zzxap在2011-03-23 09:23重新编辑 ]