Enigma25
01-01-2006, 09:30
CodeBsp:
#include <qstring.h>
QString text1=line->text(); // QTextEdit
if(text1.contains("*")){
text1.replace("*","%");
// SQL-Anweisung
}
ich gebe zb. "d*" ein. Es sollte also "d%" herauskommen..
nach der Umwandlung enthält Text nur "d" statt "d%"
( Abfrage mit qWarning("Text : "+ text1); )
komischerweise wandelt er es im qWarning fast richtig um, wenn ich
qWarning("text% : "+text1); ausführe!
wenn ich dagegen dann "*d*" eingebe, kommt sowas
-1074334424% statt "%d%"
er wandelt %d in einen Wert um, leider macht er das nicht nur im qWarning!!
warum?
Was mache ich verkehrt?:confused:
Danke Thomas
#include <qstring.h>
QString text1=line->text(); // QTextEdit
if(text1.contains("*")){
text1.replace("*","%");
// SQL-Anweisung
}
ich gebe zb. "d*" ein. Es sollte also "d%" herauskommen..
nach der Umwandlung enthält Text nur "d" statt "d%"
( Abfrage mit qWarning("Text : "+ text1); )
komischerweise wandelt er es im qWarning fast richtig um, wenn ich
qWarning("text% : "+text1); ausführe!
wenn ich dagegen dann "*d*" eingebe, kommt sowas
-1074334424% statt "%d%"
er wandelt %d in einen Wert um, leider macht er das nicht nur im qWarning!!
warum?
Was mache ich verkehrt?:confused:
Danke Thomas