DocumentationLinkWidget.cpp 818 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Editor/DocumentationLinkWidget.h>
  9. namespace PhysX
  10. {
  11. namespace Editor
  12. {
  13. DocumentationLinkWidget::DocumentationLinkWidget(const QString& format, const QString& address)
  14. : QLabel()
  15. {
  16. setText(format.arg(address));
  17. setTextInteractionFlags(Qt::TextBrowserInteraction);
  18. setOpenExternalLinks(true);
  19. setAlignment(Qt::AlignCenter);
  20. setContentsMargins(60, 7, 60, 7);
  21. setWordWrap(true);
  22. setStyleSheet(QString::fromUtf8("background-color: rgb(51, 51, 51);"));
  23. }
  24. }
  25. }