I am trying to assign different types of text fonts to my application with PyQt5, but I don't know how to assign a different one to the standard one, for example in my application I could only assign it 'Roboto', but if I want to change to Roboto-MediumItalic, I don't know how to specify that font type to it, i'm newbie to python and pyqt5
QFontDatabase.addApplicationFont("Static/fonts/Roboto-Light.ttf")
label2.setFont(QFont('Roboto',12))
folders
You have to use the styles and QFontDatabase to use
Roboto-MediumItalic
. You can also set the italic weight style through QFont.