It's possible in QGIS to add a symbology for lines which is based on a field.
This symbology may then use a method with either:
But is it possible to use both, i.e. colors AND size based on the same attribute field for classification?
It seems possible to define it with method "size" and then manually change the color (or the inverse; method "color" and specifying width manually) for each entry but it's rather tedious.