PDA

View Full Version : How do i write to Text Edit?



ambang_10111
6th November 2009, 09:05
Hi, i have created a project(Gui project) and in the main.cpp file i have some sql queries that gets data from a remote sever liekt this;
if(!query.exec("SELECT..........")){
qDebug()<<"FAIL";
}
while(query.next()){
QString name = query.value(0).toString();
qDebug() << name;
}
it works well and i have the results printed out like "abdnsh"
Now in my .ui i have Text Edit. How can i append the sql reults to the Text Edit in my .ui?
I'm a beginner, please i will appreciate

jano_alex_es
6th November 2009, 09:15
If the name of your label is m_lblMyLabel;



ui.m_lblMylabel.setText("mytext");


It does not appear in QtAssistant as function because is a propertie.