KM
Қар. 17, 2020, 1:18 Т.Қ.

Qt animation c++ , во время анимации появляються белые полосы

QPropertyAnimation

  1. void MainMenu::hideElement(MenuElement* element)
  2.  
  3. {
  4.  
  5. // this->setAttribute(Qt::WA_TranslucentBackground, true);
  6.  
  7. if(clicked) return;
  8. element->getView()->setParent(nullptr);
  9. ui->contentLayout->removeWidget(element->getView());
  10. ui->contentWidget->hide();
  11. }
  12.  
  13. void MainMenu::awakeErrorStatus()
  14. {
  15.  
  16.  
  17. // this->setAttribute(Qt::WA_TranslucentBackground, true);
  18.  
  19.  
  20. // ui->pushButton->setStyleSheet("QPushButton{background: transparent;}");
  21. this->setAttribute(Qt::WA_TranslucentBackground, true);
  22. Animator::animationforslider(ui->contentWidget, 1000, 0, 600);
  23. showElement(&errorStatusWidget);
  24.  
  25. }
  26.  
  27. void MainMenu::hideErrorStatus()
  28.  
  29. {
  30.  
  31. clicked=true;
  32.  
  33. Animator::animationforslider2(ui->contentWidget, 1000, 600, 0);
  34.  
  35. hideElement(&errorStatusWidget);
  36. }
  37.  
1

Ол саған ұнайды ма? Әлеуметтік желілерде бөлісіңіз!

0

Пікірлер

Тек рұқсаты бар пайдаланушылар ғана пікір қалдыра алады.
Кіріңіз немесе Тіркеліңіз