initial fluent-widgets ui
This commit is contained in:
32
examples/text/text_browser/demo.py
Normal file
32
examples/text/text_browser/demo.py
Normal file
@ -0,0 +1,32 @@
|
||||
# coding:utf-8
|
||||
import sys
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QApplication, QWidget, QHBoxLayout, QCompleter
|
||||
|
||||
from qfluentwidgets import LineEdit, PushButton, TextBrowser, setTheme, Theme
|
||||
|
||||
|
||||
class Demo(QWidget):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
# self.setStyleSheet("Demo {background: rgb(32, 32, 32)}")
|
||||
# setTheme(Theme.DARK)
|
||||
|
||||
self.hBoxLayout = QHBoxLayout(self)
|
||||
self.textBrowser = TextBrowser(self)
|
||||
|
||||
# add completer
|
||||
self.resize(400, 400)
|
||||
self.hBoxLayout.setAlignment(Qt.AlignCenter)
|
||||
self.hBoxLayout.addWidget(self.textBrowser, 0, Qt.AlignCenter)
|
||||
|
||||
self.textBrowser.setPlaceholderText('Search stand')
|
||||
self.textBrowser.setMarkdown("## Steel Ball Run \n * Johnny Joestar 🦄 \n * Gyro Zeppeli 🐴")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = QApplication(sys.argv)
|
||||
w = Demo()
|
||||
w.show()
|
||||
app.exec()
|
||||
Reference in New Issue
Block a user