DPinLV
2nd August 2006, 02:48
Hello,
I've been reading a few posts and think I am suffering from too much information. I'm trying to find out why my QObject::connect call returns false when I use signal/slot methods with signatures that contain my own type (class DataTabParser):
struct parsedDataTag
{
char* data_value;
unsigned int data_length;
};
class DataTabParser
{
public:
DataTabParser ();
~DataTabParser ();
bool parseTabData (const char* parse_string, unsigned int total_length);
const char* getDataValue (GameUpdateIndices index);
private:
QString m_original_data;
vector<struct parsedDataTag*> m_queue_data;
unsigned int m_values_count;
};
But, if I use a signal/slot methods with a QString or a char*or an int, etc. as arguments the connect returns true.
I see this error on the following connect call:
QObject::connect(m_emitter_class,
SIGNAL(addParsedDataSignal (DataTabParser *&)),
m_pkr_receiver_class,
SLOT(addToTable(class DataTabParser *&)),
Qt::QueuedConnection);
From Output Window:
Object::connect: No such slot QTPokerClient::addToTable(class DataTabParser*&)
Object::connect: (receiver name: 'QTPokerClientClass')
Then, after reading the following post I'm confused if I decide to use a QString, do I use a reference, do I use a const, what?
http://www.qtcentre.org/forum/f-qt-programming-2/t-signalslots-across-threads-in-qt4-3173.html
Here is my problem... I receive data on a socket, and I need to somehow get that data parsed and then inserted into a QTableWidget, and calling the Table draw code from the thread that receives the socket communication does not display properly (nothing displays).
Thanks for any help you all can provide,
Derrick
I've been reading a few posts and think I am suffering from too much information. I'm trying to find out why my QObject::connect call returns false when I use signal/slot methods with signatures that contain my own type (class DataTabParser):
struct parsedDataTag
{
char* data_value;
unsigned int data_length;
};
class DataTabParser
{
public:
DataTabParser ();
~DataTabParser ();
bool parseTabData (const char* parse_string, unsigned int total_length);
const char* getDataValue (GameUpdateIndices index);
private:
QString m_original_data;
vector<struct parsedDataTag*> m_queue_data;
unsigned int m_values_count;
};
But, if I use a signal/slot methods with a QString or a char*or an int, etc. as arguments the connect returns true.
I see this error on the following connect call:
QObject::connect(m_emitter_class,
SIGNAL(addParsedDataSignal (DataTabParser *&)),
m_pkr_receiver_class,
SLOT(addToTable(class DataTabParser *&)),
Qt::QueuedConnection);
From Output Window:
Object::connect: No such slot QTPokerClient::addToTable(class DataTabParser*&)
Object::connect: (receiver name: 'QTPokerClientClass')
Then, after reading the following post I'm confused if I decide to use a QString, do I use a reference, do I use a const, what?
http://www.qtcentre.org/forum/f-qt-programming-2/t-signalslots-across-threads-in-qt4-3173.html
Here is my problem... I receive data on a socket, and I need to somehow get that data parsed and then inserted into a QTableWidget, and calling the Table draw code from the thread that receives the socket communication does not display properly (nothing displays).
Thanks for any help you all can provide,
Derrick