QCalendarWidget的样式怎么设置
1个回答
展开全部
从源码可知以下按钮的名称,
//set names for the header controls.
//prevMonth->setObjectName(QLatin1String("qt_calendar_prevmonth"));
//nextMonth->setObjectName(QLatin1String("qt_calendar_nextmonth"));
//monthButton->setObjectName(QLatin1String("qt_calendar_monthbutton"));
//yearButton->setObjectName(QLatin1String("qt_calendar_yearbutton"));
//yearEdit->setObjectName(QLatin1String("qt_calendar_yearedit"));
你可以获取到QToolButton的对象,你想咋整都行。
QToolButton *tools = calendar->findChild<QToolButton*>(QLatin1String("qt_calendar_prevmonth"));
//set names for the header controls.
//prevMonth->setObjectName(QLatin1String("qt_calendar_prevmonth"));
//nextMonth->setObjectName(QLatin1String("qt_calendar_nextmonth"));
//monthButton->setObjectName(QLatin1String("qt_calendar_monthbutton"));
//yearButton->setObjectName(QLatin1String("qt_calendar_yearbutton"));
//yearEdit->setObjectName(QLatin1String("qt_calendar_yearedit"));
你可以获取到QToolButton的对象,你想咋整都行。
QToolButton *tools = calendar->findChild<QToolButton*>(QLatin1String("qt_calendar_prevmonth"));
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询