How can I set the value of the textedit box and slider of ui with the value from a config file when it has been created?
On 10/1/19 9:51 AM, Spencer Du wrote:
> How can I set the value of the textedit box and slider of ui with the value from a config file when it has been created meaning if a configuration file exists then set the UI with value from the config file otherwise load ui with nothing set to any value.
Your code appears to try to do all this in the printValue() method of
your class, however nothing calls that method. Most likely you'd want
to move that code to the __init__() initializer. I can't really comment
further since your code cannot be run as posted, since it imports a
"myconfig" module that is not provided.
More specific help regarding PyQt perhaps may be found at the PyQt
mailing list that Riverbank Software (the makers of PyQt) host).