카테고리 없음2025. 11. 3. 11:44
        # ----- Add Arial Narrow Font to Application -----
        from PySide6.QtGui import QFontDatabase
        font_path = dir + r"/resources/ArialNarrow.ttf"
        font_id = QFontDatabase.addApplicationFont(font_path)
        if font_id != -1:
            QFontDatabase.applicationFontFamilies(font_id)
        # ------------------------------------------------
Posted by 오늘보다 나은 내일
카테고리 없음2023. 12. 21. 08:55
QSlider::groove:horizontal {
border: 1px solid #bbb;
background: white;
height: 10px;
border-radius: 4px;
}

QSlider::sub-page:horizontal {
background: qlineargradient(x1: 0, y1: 0,    x2: 0, y2: 1,
    stop: 0 #66e, stop: 1 #bbf);
background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1,
    stop: 0 #bbf, stop: 1 #55f);
border: 1px solid #777;
height: 10px;
border-radius: 4px;
}

QSlider::add-page:horizontal {
background: #fff;
border: 1px solid #777;
height: 10px;
border-radius: 4px;
}

QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
    stop:0 #eee, stop:1 #ccc);
border: 1px solid #777;
width: 13px;
margin-top: -2px;
margin-bottom: -2px;
border-radius: 4px;
}

QSlider::handle:horizontal:hover {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
    stop:0 #fff, stop:1 #ddd);
border: 1px solid #444;
border-radius: 4px;
}

QSlider::sub-page:horizontal:disabled {
background: #bbb;
border-color: #999;
}

QSlider::add-page:horizontal:disabled {
background: #eee;
border-color: #999;
}

QSlider::handle:horizontal:disabled {
background: #eee;
border: 1px solid #aaa;
border-radius: 4px;
}
Posted by 오늘보다 나은 내일
카테고리 없음2022. 5. 13. 10:00

import pandas as pd
df = pd.DataFrame([80,90,70,50,40],columns=['mathVal'])
df['Grade'] =list(map(lambda x: "A" if (x >=90) else ("B" if (x >=80) else ("C" if (x >=70) else "D")),df.mathVal))

print(df)
Posted by 오늘보다 나은 내일