  #include "selfdrive/hardware/hw.h"
  #include "selfdrive/common/util.h"
  
  OffroadAlert::OffroadAlert(QWidget* parent) : QFrame(parent) {
    QVBoxLayout *layout = new QVBoxLayout();
    layout->setMargin(50);
    layout->setSpacing(30);
  
    QWidget *alerts_widget = new QWidget;
    QVBoxLayout *alerts_layout = new QVBoxLayout;
 
</s> remove   QWidget *alerts_widget = new QWidget;
  QVBoxLayout *alerts_layout = new QVBoxLayout;
 </s> add   QWidget *alerts_widget = new QWidget(this);
  alerts_layout = new QVBoxLayout; </s> remove TermsPage::TermsPage(QWidget *parent) : QFrame(parent){
 </s> add void TermsPage::showEvent(QShowEvent *event) {
  // late init, building QML widget takes 200ms
  if (layout()) {
    return;
  }
 </s> remove #include <QQuickWidget>
#include <QQmlContext>
 </s> add 
  QVBoxLayout *layout = new QVBoxLayout;
  #include "selfdrive/hardware/hw.h"
  #include "selfdrive/common/util.h"
  
  OffroadAlert::OffroadAlert(QWidget* parent) : QFrame(parent) {
  QVBoxLayout *layout = new QVBoxLayout;
    layout->setMargin(50);
    layout->setSpacing(30);
  
    QWidget *alerts_widget = new QWidget;
    QVBoxLayout *alerts_layout = new QVBoxLayout;
keep keep keep keep replace keep keep keep keep keep
 UI: fast startup (#20781)

* faster startup

* faster

* cleanup

Co-authored-by: Comma Device <device@comma.ai> 
selfdrive/ui/qt/widgets/offroad_alerts.cc