Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
configuration files
Hello,
It's rather a general question about kde. Suppose I want to save some kind of information for future work with the user. I can save it in some file at his home directory or in the /etc folder. Can someone please explain me what is the rule for that, how you approach it and other tips/hints...
R. alex
Depends on the kind of application, and what kind of settings, But usually, you should definitely save it somewhere in their user's home directory. That way every user keeps their own settings.
Here's a good link:
http://www.kdevelop.org/3.0/doc/tutorial_settings/
and specifically related to your issue is
part 3.
Also there is the Qini class in the QtForum wiki which works pretty good.
Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);
Thanx!!! That's is the best thing I could wish to find!