Hi I have 2 classes and I would like to have this situation.
When I use "releaseclick" in first scene, then I want to do some reaction in 2nd scene. I dont know, how create it :(
Please help
Printable View
Hi I have 2 classes and I would like to have this situation.
When I use "releaseclick" in first scene, then I want to do some reaction in 2nd scene. I dont know, how create it :(
Please help
thanks, but I dont know, which signal I could use...
I would like to make reaction on mouseReleaseEvent but this proteeted function isnot singal. Could you help me please again? Thank you very muchCode:
textureView = new TextureView(); . . . { textureScene->setSceneRect(0, 0, 180, 200); setScene(textureScene); addItems(); } void TextureView::addItems() { ImageItem *image; image->setPos(0, 0); textureScene->addItem(image); } { if (ImageItem *image = qgraphicsitem_cast<ImageItem *>(item)) setId(image->id()); } } void TextureView::setId(int id) { itemId=id; } { recordId = id; }
I am trying to write own singnal and slot for connection between 2 scene
Code:
connect(textureView, SIGNAL(textureId(int)), scene, SLOT(getTextureId(int)));
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...
yes it is free because I dont know, how to set integer, which will be sendCode:
void TextureView::textureId(int id) { }
So I tried to compiled and in moc_*.cpp file It create me
but compiler wrote error that in moc_*.coo is first definition of this signal.Code:
void TextureView::textureId(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; }
Please help me, I didnot wrote any own signals thanks
edit:
I would like to send itemId to scene to slot SLOT(getTextureId(int))
Code:
void TextureView::setId(int id) { itemId=id; }
my problem fixed :) you can lock this thread :)
It was my stupid mistake... :mad: :o