I am trying to write own singnal and slot for connection between 2 scene
connect(textureView, SIGNAL(textureId(int)), scene, SLOT(getTextureId(int)));
connect(textureView, SIGNAL(textureId(int)), scene, SLOT(getTextureId(int)));
To copy to clipboard, switch view to plain text mode
how should write this signal? How I get information, which integer will be send to slot?
I cannot imagine how to set integer, in order to send to slot
when I tried it now, I have...
void TextureView::textureId(int id)
{
}
void TextureView::textureId(int id)
{
}
To copy to clipboard, switch view to plain text mode
yes it is free because I dont know, how to set integer, which will be send
So I tried to compiled and in moc_*.cpp file It create me
void TextureView::textureId(int _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
}
void TextureView::textureId(int _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
To copy to clipboard, switch view to plain text mode
but compiler wrote error that in moc_*.coo is first definition of this signal.
Please help me, I didnot wrote any own signals thanks
edit:
I would like to send itemId to scene to slot SLOT(getTextureId(int))
void TextureView::setId(int id)
{
itemId=id;
}
void TextureView::setId(int id)
{
itemId=id;
}
To copy to clipboard, switch view to plain text mode
Bookmarks