void QtPropertyDataDavaKeyedArcive::AddKeyedArchiveField() { QPushButton* btn = dynamic_cast<QPushButton*>(QObject::sender()); if(NULL != curArchive && NULL != btn) { KeyedArchiveItemWidget *w = new KeyedArchiveItemWidget(curArchive, lastAddedType); QObject::connect(w, SIGNAL(ValueReady(const DAVA::String&, const DAVA::VariantType&)), this, SLOT(NewKeyedArchiveFieldReady(const DAVA::String&, const DAVA::VariantType&))); w->show(); QRect bRect = btn->geometry(); QPoint bPos = btn->mapToGlobal(btn->mapFromParent(bRect.topLeft())); QRect wRect = w->geometry(); QPoint wPos = QPoint(bPos.x() - wRect.width() + bRect.width(), bPos.y() + bRect.height()); w->move(wPos); }