Skip to content
Snippets Groups Projects

About window

Merged Petter Källström requested to merge about_window into master
1 file
+ 12
2
Compare changes
  • Side-by-side
  • Inline
+ 12
2
import sys # ONLY FOR DEBUG
from qtpy.QtCore import Qt
from qtpy.QtGui import QPixmap
from qtpy.QtGui import QCursor, QPixmap
from qtpy.QtWidgets import QApplication # ONLY FOR DEBUG
from qtpy.QtWidgets import (
QDialog,
@@ -10,6 +10,7 @@ from qtpy.QtWidgets import (
QLabel,
QPushButton,
QScrollArea,
QToolTip,
QVBoxLayout,
)
@@ -124,6 +125,13 @@ class AboutWindow(QDialog):
self.add_information_to_layout()
def hoverText(self, url):
# self.setWindowTitle(url) # When removing mouse, the title gets "B-ASIC Scheduler". Where does THAT come from?
if url:
QToolTip.showText(QCursor.pos(), url)
else:
QToolTip.hideText()
def add_information_to_layout(self):
# |1 Title |2 |
# | License | Logo | <- layout12
@@ -152,9 +160,11 @@ class AboutWindow(QDialog):
self.logo2.setFixedWidth(100)
label3 = QLabel(
"""See our <a href="https://gitlab.liu.se/da/B-ASIC/">git page</a>"""
"""See the <a href="https://da.gitlab-pages.liu.se/B-ASIC/">documentation page</a>"""
""" and the <a href="https://gitlab.liu.se/da/B-ASIC/">git page</a>"""
)
label3.setOpenExternalLinks(True)
label3.linkHovered.connect(self.hoverText)
button4 = QPushButton()
button4.setText("OK")
Loading