Tableview and attributes set with UI Editor issue
If I set font sizes in UI Editor for Tableview:
It doesn't end up applying:
Same if I set it manually with the ListDataSource.font
Hmm, I can't reproduce this here. Could you show your code? Perhaps you're re-assigning the data source somewhere?
I remember somewhere... Docs or forum post about not putting references to UI elements in the UI class init, which is where my font setting is. Even at that, I still changed the font size in the UI editor and nothing changed.
Well, you're creating a new data source in your
__init__method, so anything that you configured in the UI file won't have an effect, as you're replacing it entirely.
However, I manually set <code> ui.ListDataSource.font = ('<system>', 10)
You should set
ui.ListDataSourceis the class, not your object).
You want self.listsource.font, not ui.ListDataSource.font!
Completely misunderstood I was creating a new class. I think I get it now. Spent the last 30min reading over documentation and tinkering to get it.