DocumentationLinkWidget.cpp 850 B

1234567891011121314151617181920212223242526272829
  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 <PhysX_precompiled.h>
  9. #include <Editor/DocumentationLinkWidget.h>
  10. namespace PhysX
  11. {
  12. namespace Editor
  13. {
  14. DocumentationLinkWidget::DocumentationLinkWidget(const QString& format, const QString& address)
  15. : QLabel()
  16. {
  17. setText(format.arg(address));
  18. setTextInteractionFlags(Qt::TextBrowserInteraction);
  19. setOpenExternalLinks(true);
  20. setAlignment(Qt::AlignCenter);
  21. setContentsMargins(60, 7, 60, 7);
  22. setWordWrap(true);
  23. setStyleSheet(QString::fromUtf8("background-color: rgb(51, 51, 51);"));
  24. }
  25. }
  26. }