PDA

View Full Version : Where are these settings stored?



adorp
24th July 2007, 09:32
For instance,

void MailClient::writeSettings()
{
QSettings settings("Software Inc.", "Mail Client");

settings.beginGroup("mainWindow");
settings.setValue("size", size());
settings.setValue("mainsplitter", splitter_2->saveState());
settings.setValue("rightsplitter", splitter->saveState());
settings.endGroup();
}

In Microsoft Windows, we know these settings are stored in the registry, but in Linux, for example in Fedora 6, where are these settings stored on earth? Does anyone know it? Thanks ahead:o

jpn
24th July 2007, 09:34
QSettings - Locations Where Application Settings Are Stored (http://doc.trolltech.com/4.3/qsettings#platform-specific-notes)

adorp
24th July 2007, 12:10
"QSettings - Locations Where Application Settings Are Stored"

Hi, thank you, but I can't find it in the class QSetings, I can't find it in my Fedora 6 - I use find and grep to search my hard disk for at least 3 times.

And, what do you mean "Locations"

Please ...

adorp
24th July 2007, 17:11
I mean if Qt "quietely" hides these information into some .ini file, like /etc/xxx.ini, does it? If so, where is it? Thanks anyway!

fullmetalcoder
24th July 2007, 17:20
I mean if Qt "quietely" hides these information into some .ini file, like /etc/xxx.ini, does it? If so, where is it? Thanks anyway!
Did you followed the link? As explained there the config files are placed within your home directory... Typically, if you're user account is, for instance, "coder" then the files you're looking for are in "/home/coder/.config/Software Inc/Mail Client.ini" what makes them difficult to spot at first is that a name starting with a dot is considered as "hidden" i.e. it won't appear in your browser unless you specify that you want to "show hidden files". Even ls won't show them unless you use "ls -A"...

adorp
24th July 2007, 18:26
Bravo! Bravo!

But I must point out that link shows me "Not Acceptable", so:p

The toughest coder I've ever seen, thank you from heart! Please help me solve another problem I posted for a whole day but fail to get the satisfactory answer.

-------------------------------------------

"Problem about staying on taskbar:"

How can I make an Application whose interface is a dialog appear in the taskbar under Linux, for example Fedora 6?

Issue and Phenomenon:
1. when I use Qt4 write the program with QMainWindow and after I start up the program , I can find it on taskbar;

2. But If I write such a program with QDialog as its main interface, then as I run it, it seems nomral except that it can't stay on task bar. So, why?

3. If just only writing codes, how to implement it?

4. And if using Qt Designer, how to implement it then? :cool:

jacek
24th July 2007, 22:39
But I must point out that link shows me "Not Acceptable"
There's nothing wrong with the link posted by jpn.


"Problem about staying on taskbar:"

How can I make an Application whose interface is a dialog appear in the taskbar under Linux, for example Fedora 6?
[...]
Please, don't post the same question more than once and don't post unrelated questions in the same thread.