작동하지 않습니다.removeWidget() 나는 위젯을 추가하고 유사하게 그 위젯을 제거하고 싶지만 레이아웃에서 제거에 위젯이 수 없습니다입니다
void mywindow::popUpWindow()
{
if(stack1->currentIndex()==0){
mainLayout->removeWidget(stack3);
mainLayout->addWidget(stack2);
this->setGeometry(80,50,250,200);
}
if(stack1->currentIndex()==1){
mainLayout->removeWidget(stack2);
mainLayout->addWidget(stack3);
this->setGeometry(80,50,250,200);
}
}
나는 QStackedWidget
의 currentIndex
을 확인하고 추가하고 위젯을 제거하고 있습니다.