-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
651d5d3
commit d1f2d23
Showing
3 changed files
with
89 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import random | ||
|
||
from PySide6.QtGui import QFont, Qt | ||
from PySide6.QtWidgets import QVBoxLayout, QLineEdit | ||
|
||
from image_view import ImageView | ||
|
||
|
||
class GraphicsView(QVBoxLayout): | ||
def __init__(self): | ||
super().__init__() | ||
self.text_view = QLineEdit() | ||
color = random.choice( | ||
[ | ||
"#37874c", | ||
"#374687", | ||
"#873783", | ||
"#873746", | ||
"#909639", | ||
"#966939", | ||
"#399681", | ||
"#399658", | ||
"#07677a", | ||
"#650a8c", | ||
"#802d06", | ||
] | ||
) | ||
font = QFont() | ||
font.setBold(True) | ||
font.setPointSize(14) | ||
self.text_view.setFont(font) | ||
self.text_view.setStyleSheet(f"background-color: {color}") | ||
self.text_view.setAlignment(Qt.AlignCenter) | ||
|
||
self.image_view = ImageView() | ||
|
||
self.addWidget(self.image_view) | ||
self.addWidget(self.text_view) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters