If I do as you propose (ie declare the selector in the mainform), then the code that's supposed to retrieve the rows selected in the selector class fails.
// Destinataires Destinataires_dlg( this ); <- in main form in your new syntax
// add number of char available
int NbCharRestants = NbCharSMSMax - qMessage->toPlainText().length();
s.setNum(NbCharRestants,10);
s = TxtCharSMSMax + " " + s;
appendRow( s );
// add sms credit
qMajCredit();
// get the selected destinations
QStringList ret
= Destinataires_dlg.
getDestList(); <
- compile error
if ( ret.size() )
{
appendRow ( TxtDestinataires );
for( int i = 0; i < ret.size(); i++) appendRow ( ret[i] );
}
else
{
s = TxtDestinataires + " * " + TxtIndefini;
appendRow( s );
}
}
// Destinataires Destinataires_dlg( this ); <- in main form in your new syntax
model->removeRows(0, model->rowCount(QModelIndex()), QModelIndex());
// add number of char available
int NbCharRestants = NbCharSMSMax - qMessage->toPlainText().length();
s.setNum(NbCharRestants,10);
s = TxtCharSMSMax + " " + s;
appendRow( s );
// add sms credit
qMajCredit();
// get the selected destinations
QStringList ret = Destinataires_dlg.getDestList(); <- compile error
if ( ret.size() )
{
appendRow ( TxtDestinataires );
for( int i = 0; i < ret.size(); i++) appendRow ( ret[i] );
}
else
{
s = TxtDestinataires + " * " + TxtIndefini;
appendRow( s );
}
}
To copy to clipboard, switch view to plain text mode
147 C:\Qt\test\sms\menu.cpp `getDestList' has not been declared
Bookmarks