C++ Qt5: Concatenating mixed types into a QString (string)
I am learning to use Qt5 with C++ and I want the simplest way to concatenate variables amongst string literals. I have the following code: https://code.sololearn.com/cz5SQVdy9L1t/?ref=app 'this' is the MainWindow object and i have defined a few public variables in the header file: length and height as double type. verticalPoles is integer type. MAX_* are constant values used for the math. The if code block is intentionally empty, i'm just learning and trying this for now. With this code, the output is not correct. It concatenates the string literals together correctly, but the values of the double/integer types are not shown. What's the simplest way to concat mixed types together? I'm happy to use Qt specific functions or operators too if there's any Qt experts here.