Hi,
I made a personnal class which inherits QMap:
class CfgMgr : public QMap<QString, CfgSet*> {...}
I'm trying to iterate over all its elements like that:
CfgMgr* m_pDefaults = new CfgMgr;
// .../...
QMapIterator<QString, CfgSet*> ics(*m_pDefaults);
while (ics.hasNext()) {
// doing my stuff
}
And I get the compile error:
...
I am trying to use this code in my QT app
QMap<QString,QMap>
but there is a build problem it says
C:/****/****/****/***/domparser.h:14: error: type/value mismatch at argument 2 in template parameter list for 'template<class Key, class T> class QMap'
...
I have 2 datas which type is QMap:
1.QMap novel;
QString tempChapter;
QString tempStory;
2.QMap combo;
int tempInd;
QString tempChap;
my question is:
How can I save these 2 Datas into a single file??
And if it's successfully saved, how can I load these 2 datas?
Please insert the code too because I'm a beginner C++ prog...
Greetings all,
I have a code snippet as follows :
class AppCtx {
private:
QMap<QString,IRzPlugin*> pluginsMap;
public :
void addPlugin(IRzPlugin *plugin)
{
pluginsMap.insert(plugin->getPluginUID(),plugin);
}
QMap<QString,IRzPlugin*> & getPlugins()
{
return pluginsMap;
}
}
In my client code I access the QMap as follows....
Apparently QVariant (needed for QSettings class) supports creation from QMap<QString, QVariant>
But trying to initialise something like this:
QMap<QString, QVariant(QMap<QString, QVariant>)> i;
Returns
instantiated from here. <-- points to code above.
function returning a function.
So then i tried the QMap<QString, QVariant> overlo...
I have a class that contains a QMap object:
QMap<QString, Connection*> users;
Now, in the following function Foo(), the if clause always returns false but when I iterate through the map, the compared QString, i.e., str1 is present in the keys.
void Foo(QString& str1, QString& str2)
{
if(users.contains(str1))
users[st...