《Qt基类翻译_招募人员翻译.docx》由会员分享,可在线阅读,更多相关《Qt基类翻译_招募人员翻译.docx(1页珍藏版)》请在第壹文秘上搜索。
1、notification.Notethatthenewchildmightnotbefullyconstructedwhenthisnotificationissent;callingpurevirtualfunctionsonthechildcanleadtoacrash.QGraphicsItem::ItemChildRemovedChange7Achildisremovedfromthisitem.Thevalueargumentisthechilditemthatisabouttoberemoved(i.e.zaQGrdphicsItempointer).Thereturnvaluei
2、sunused;yocannotadjustanythinginthisnotification.numQGraphicsItem:GraphicsItemFlagflagsOGraphicsItem:GraphicsIteinFlagsThisenumdescribesdifferentflagsthatyoucansetonanitemtotoggledifferentfeaturesintheitem1sbehavior.Allflagsaredisabledbydefault.ConstantValueDescriptionQGraphicsItem:ItemIsMovableOxlT
3、heitemsupportsinteractivemovementusingthemouse.Byclickingontheitemandthendragging,theitemwillmovetogetherwiththemousecursor.Iftheitemhaschildren/allchildrenarealsomoved.IftheitemISpartofaSelectionrallselecteditemsarealsomoved-Thisfeature1.sprovidedasaconveniencethroughthebaseimplementationofQGraphic
4、sItem1Smouseeventhandlers-QGraphicsItem:IteniIsSelectable0x2Theitemsupportsselection.EnablingthisfeaturewillenablesetSelected()totoggleselectionfortheitem.ItwillalsolettheitembeselectedautomaticallyasaresultofcallingQGraphicsScene:JsetSelectionArea)rbyclickingonanitem,orbyusingrubberbandselectioninQ
5、GraphicsView.QGraphicsItem:ItemlsFocusable0x4Theitemsupportskeyboardinputfocus(i.e.jitisaninputitem).EnablingthisflagwillallowtheitemtoacceptfocusjwhichagainallowsthedeliveryofkeyeventstoQGraphicsItem:ReyPressEvent()andQGraphicsItem:ReyReleaseEvent().TheGraphicsItemFlagstypeisatypedefforQFlags.Itsto
6、resanORcnbinationofGraphicsItemFlagvalues.MemberFunctionDocumentationQGraphlcsltem:JQGraphicsltem(QGraphicsItem*parent-0,QGraphicsScenescene0)ConstructsaQGraphicsItemwiththparentparentonscene.IfparentisOrtheitemwillbeatop-level.Ifsceneis0,thitemwillnotbeassociatedwithascene.virtualitschildren.IfthisitemistheitemwillberemovedfromtheconstSeealsoQGraphicsScene:addltem).QGraphicsItem:-QGraphicsItem()?DestroystheQGraphicsItemandallcurrentlyassociatedwithascenezscenebeforeitisdeleted,boolQGraphicsItem:racceptDrops()