Der Dialog heißt "pm" und wird so erstellt:
Code: Alles auswählen
void ircclient::event_privmsg (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count)
{
dump_event (session, event, origin, params, count); //Event dumper
QString text(params[1]); // kopiere die Nachricht
//suche nach einen zugehörigen Dialog (falls vorhanden)
for(list<pm*>::iterator itr = opened_pms.begin(); itr != opened_pms.end(); itr++)
{
if(!strcmp((*itr)->person.toAscii().data(), origin))
{
//vorhanden, also nur einfügen
(*itr)->tb_messages.insertPlainText(text);
return;
}
}
//nicht vorhanden - neuer Dialog wird erstellt
pm dlg(origin); // Initialisierung
dlg.show(); // Dialog anzeigen
opened_pms.push_back(&dlg); //Dialog in die Liste eintragen
dlg.tb_messages.insertPlainText(text); //Text in neuen Dialog einfügen
}
Code: Alles auswählen
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
Wie kann ich das richtig hinbiegen?
Gesamter Source (steht unter der GPL3): http://intelcentino.in.funpic.de/upload/irc.zip (wird aber nicht kompilierbar sein, weil ich eigene Bibliotheken verwende)[/code]