${Name}Widget.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // {BEGIN_LICENSE}
  2. /*
  3. * Copyright (c) Contributors to the Open 3D Engine Project.
  4. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. *
  6. * SPDX-License-Identifier: Apache-2.0 OR MIT
  7. *
  8. */
  9. // {END_LICENSE}
  10. #include <AzCore/Utils/Utils.h>
  11. #include <QLabel>
  12. #include <QVBoxLayout>
  13. #include "${Name}Widget.h"
  14. namespace ${SanitizedCppName}
  15. {
  16. ${SanitizedCppName}Widget::${SanitizedCppName}Widget(QWidget* parent)
  17. : QWidget(parent)
  18. {
  19. QVBoxLayout* mainLayout = new QVBoxLayout(this);
  20. QLabel* introLabel = new QLabel(QObject::tr("Put your cool stuff here!"), this);
  21. mainLayout->addWidget(introLabel, 0, Qt::AlignCenter);
  22. QString helpText = QString(
  23. "For help getting started, visit the <a href=\"https://o3de.org/docs/tools-ui/\">UI Development</a> documentation<br/>or come ask a question in the <a href=\"https://discord.gg/R77Wss3kHe\">sig-ui-ux channel</a> on Discord");
  24. QLabel* helpLabel = new QLabel(this);
  25. helpLabel->setTextFormat(Qt::RichText);
  26. helpLabel->setText(helpText);
  27. helpLabel->setOpenExternalLinks(true);
  28. mainLayout->addWidget(helpLabel, 0, Qt::AlignCenter);
  29. setLayout(mainLayout);
  30. }
  31. }
  32. #include <moc_${Name}Widget.cpp>