Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding constant to QString

I have the following:

#define versions 0.9.0

and I want to add to QString:

QString str = QString("Software version %1").arg(versions); 

this won't work. anyone know why?

thanks

like image 216
moesef Avatar asked Apr 07 '26 18:04

moesef


1 Answers

#define versions "0.9.0"

You forgot to put quotes around the version number.

like image 176
Joey Avatar answered Apr 10 '26 00:04

Joey