At this website I found an interesting way to create a switch statement with strings. However, this seems really long and drawn out. I wanted to know if it's possible to turn a particular string into an integer that can be used in a switch statement.
So psuedo code would be something like this
QString str = "spinbox_1";
switch stoi( str )
case 1543:
//code here
case 2343:
//code here
case 3424:
//code here