I have calendar in Qt. I want when user selects date, 14(Qint32) will be added in it and resultant date should be highlighted on 开发者_如何学Go2nd calendar. Please let me know how can I do that, I'm beginner.
Something like that should do the trick.
QCalendarWidget cal1 = new QCalendarWidget(this);
QCalendarWidget cal2 = new QCalendarWidget(this);
connect(cal1, SIGNAL(clicked(const QDate &)), this, SLOT(changeDate(const QDate &)));
.../...
void MyWidget::changeDate(const QDate &date1) //< declared as a slot in your .h
{
    QDate d2 = date1.addDays(14);
    cal2->setSelectedDate(d2);
}
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论