desktop_app/app/ui/chat_list_view.py
2025-09-06 05:10:09 +03:00

24 lines
697 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from PySide6.QtWidgets import QWidget, QListWidget, QVBoxLayout, QLabel
class ChatListView(QWidget):
def __init__(self, username):
super().__init__()
self.setWindowTitle(f"Чаты — {username}")
self.setMinimumSize(400, 500)
self.init_ui()
def init_ui(self):
layout = QVBoxLayout()
self.label = QLabel("Список чатов:")
layout.addWidget(self.label)
self.chat_list = QListWidget()
# Для примера добавим 1 чат
self.chat_list.addItem("Чат с Alice")
self.chat_list.addItem("Чат с Bob")
layout.addWidget(self.chat_list)
self.setLayout(layout)