Hallo..
wahrscheinlich, geht es ruckzuck oder es ist schon zu spät für mich :-(
folgendes ich habe ein function die char * zurück gibt, diesen char * möchte ich einem QString übergeben.
Wie mach ich das?
Thomas
Hallo..
wahrscheinlich, geht es ruckzuck oder es ist schon zu spät für mich :-(
folgendes ich habe ein function die char * zurück gibt, diesen char * möchte ich einem QString übergeben.
Wie mach ich das?
Thomas
PS: Suse 8.1, KDE 3.1, KDevelop 2.1.5, QT 3.1.1
QString::QString ( const char * str )
Constructs a string that is a deep copy of str, interpreted as a classic C string.
If str is 0, then a null string is created.
This is a cast constructor, but it is perfectly safe: converting a Latin1 const char* to QString preserves all the information. You can disable this constructor by defining QT_NO_CAST_ASCII when you compile your applications. You can also make QString objects by using setLatin1(), fromLatin1(), fromLocal8Bit(), and fromUtf8(). Or whatever encoding is appropriate for the 8-bit data you have.
See also isNull().
Hallo
dies ist die function char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
und hatte dies gemacht:
QString value (PQgetvalue(m_result, row, index));
aber irgendwie scheint es wohl nicht zu gehn :-(
oder ich habs nicht verstanden...
Thomas
PS: Suse 8.1, KDE 3.1, KDevelop 2.1.5, QT 3.1.1
Achje... das problem lag ganz woanders...:-D das obrige hab ich schon gelöst... vielen DankOriginal geschrieben von Don_Bruno
Hallo
dies ist die function char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
und hatte dies gemacht:
QString value (PQgetvalue(m_result, row, index));
aber irgendwie scheint es wohl nicht zu gehn :-(
oder ich habs nicht verstanden...
Thomas
Thomas
PS: Suse 8.1, KDE 3.1, KDevelop 2.1.5, QT 3.1.1
Lesezeichen