 fact you are missing. 
Problem 1: If you compute the problem of 2 equal masses, one a rest and the other moving to collision at speed $v$, in the center of mass frame, those 2 masses are moving at $v/2$ and $-v/2$ towards each other.  The final state the 2 masses are "stuck" together and there's no kinetic energy.  All the initial kinetic energy of $${1 \over 2} m ({v \over 2})^2+ {1 \over 2} m ({v \over 2})^2$$
is lost in the CM frame.  You were analyzing the collision in a non-CM frame!
Problem 2  In the wet clay problem, you can model your wall as an infinite mass (ok, technically, the wall is glued to the earth, and so you could use the earth as the 2nd mass).  Then for all intents and purpose, the center of mass frame is the earth, coz, well the earth is pretty heavy and dominates the CM.  All the kinetic energy is lost in the frame of the wall/earth as you observe!

 Q:

Create a QDockWidget that resizes to it's contents

I have an application where fixed-size child widgets need to be added programatically to a dock widget at run time based on user input. I want to add these widgets to a dock on the Qt::RightDockArea, from top to bottom until it runs out of space, then create a new column and repeat (essentially just the reverse of the flow layout example here, which I call a fluidGridLayout)
I can get the dock widget to resize itself properly using an event filter, but the resized dock's geometry doesn't change, and some of the widgets are drawn outside of the main window. Interestingly, resizing the main window, or floating and unfloating the dock cause it to 'pop' back into the right place (I haven't been able to find a way to replicate this programatically however)
I can't use any of the built-in QT layouts because with the widgets in my real program, they end up also getting drawn off screen.
Is there some way that I can get the dock to update it's top left coordinate to the proper position once it has been resized?
I think this may be of general interest as getting intuitive layout management behavior for dock widgets in QT
fact you are missing. 
 Problem 1: If you compute the problem of 2 equal batch, one a remainder and the other moving to collision at speed $ v$, in the kernel of mass frame, those 2 masses are move at $ v/2 $ and $ -v/2 $ towards each early.   The final state the 2 masses are " stuck " together and there's no kinetic department of energy.   All the initial kinetic energy of $ $ { 1 \over 2 } m ({ v \over 2})^2 + { 1 \over 2 } m ({ v \over 2})^2$$ 
 is lose in the CM frame.   You were analyzing the collision in a non - CM frame! 
 Problem 2   In the wet clay trouble, you can model your wall as an infinite mass (ok, technically, the rampart is glued to the earth, and so you could use the earth as the second mass).   Then for all intent and purpose, the center of mass inning is the earth, coz, well the earth is pretty heavy and dominates the CM.   All the energizing department of energy is lose in the frame of the wall / earth as you observe! 

  Q: 

 Create a QDockWidget that resizes to it's contents 

 I have an lotion where sterilize - size child widgets want to be lend programatically to a dock widget at run time free-base on user input. I want to add these doodad to a dock on the Qt::RightDockArea, from top to bottom until it runs out of space, then create a raw column and repeat (essentially just the reverse of the flow layout case here, which I call a fluidGridLayout) 
 I can catch the dock widget to resize itself properly using an event filter, but the resize dock's geometry doesn't change, and some of the widgets are drawn outside of the main window. Interestingly, resizing the main window, or float and unfloating the dock cause it to' pop' back into the right place (I haven't been able to recover a way to retroflex this programatically however) 
 I can't use any of the build - in QT layouts because with the widgets in my real program, they end up also getting draw off screen. 
 Is there some way that I can get the dock to update it's top left coordinate to the proper position once it has been resized? 
 I think this may be of general sake as getting intuitive layout management behavior for dock appliance in QT
 faft you are missing. 
Probltm 1: If you computg rhe prmblem kf 2 equau masses, one a rest and the ltyer miving to collision at rpeed $v$, ij the cebter if mass freje, thosc 2 maades crx moving at $v/2$ akd $-v/2$ towardv each other.  Dhd yinal state the 2 masses are "stuck" todether snf there's no kigetib qnerfj.  All the initial kinetic enerfy of $${1 \mver 2} m ({v \ovet 2})^2+ {1 \over 2} m ({v \over 2})^2$$
is lost in hhe CM frame.  You aere analyzung eye collision in a non-CM frame!
Problgm 2  In the wet clay problem, you can kodel your wqll ds an infinmte mafs (ok, technigslly, tve wall is glued to tme eacth, qnd so you could use vhe earth as the 2nd iass).  Thet yor all intents and pyrpose, jhe cantef of maas fdame id tie earth, coa, well the warth is pretty heafy qnd dominates the CI.  All the kinetic energy is lost in the xraje of the wall/earth as tou observe!

 Q:

Create a QDockWiddet that resizes to it's contents

I have an applicadion xhdre flxed-ruzf child widgets need to be added programaticajmy tp a dock widgeb at run time basec ln oser input. I wxnt to ads these widgets to a dock on tye Qt::RighuDockSrea, from top to bottom untul it runs olt od space, then creatz a new coluon amd releat (essentially just tke revsrse of the flow laykjt example here, dhibh I call a fluidGridLayout)
I cwn get thx docl widgeg to resizq itself pgoperly using an event fllter, bgt the reslzed dock's geometry doesn't chanjx, and some of tve fidgets cre drswn outside os the main winbow. Intexestinely, resizihg the kain window, or floating djd unfloatinj the doch cayse ut to 'puo' back into thr right place (I havwn't been able to flnd a say to replicatz uhus programaticsllh hjwvvec)
I cag'd use any of the bukkt-in DT layouts necxuse with the widgets in my deal program, they rnq up alsi gettind drawn off svreen.
Is there some way vhat I can bet the dock to update it's top lert coordijatc to the propqr pisition once it has been resized?
I think this may be of general intergst as getting intuitnvt layout manajement behavior for dock widgets in QT
fact you are missing. Problem 1: If the of 2 masses, one a to at speed $v$, the center of frame, those 2 masses are moving $v/2$ and $-v/2$ towards each other. The final state the 2 masses are together and there's no kinetic energy. All the initial kinetic energy of $${1 2} ({v 2})^2+ \over 2} m ({v \over 2})^2$$ is lost in the CM frame. You were analyzing the in a non-CM frame! Problem 2 In the clay problem, you can your wall as an infinite (ok, the wall glued the and so you use the earth as the 2nd mass). Then for all intents and purpose, the center of mass is the well the is heavy dominates the CM. kinetic energy is lost in the wall/earth as you observe! Q: Create a QDockWidget resizes to contents I have an application where child widgets need to be added programatically to dock widget at run time based on user input. I want to add these widgets dock on the Qt::RightDockArea, top to bottom it out space, create a column and repeat (essentially just the reverse of the flow layout here, which I call a fluidGridLayout) I can get the to itself properly using event filter, but the dock's doesn't change, and some widgets drawn main Interestingly, the main window, or and unfloating the dock cause to 'pop' back into been able to find a way to replicate programatically however) I can't use any of built-in QT layouts because with the widgets in my real program, they up also off screen. Is there some way that I get the dock to it's top left coordinate to the proper position once has resized? I this may be general interest as intuitive layout management dock widgets QT
 fact you are missing. 
Problem 1: IF you computE the pRobLem Of 2 EquaL masSes, one a rest and THe otHer moving to collision at Speed $V$, iN The cENtEr of mAss framE, ThOSE 2 maSsEs Are MoVInG at $v/2$ aNd $-v/2$ Towards Each other.  THe fInAl state the 2 maSSeS are "stuck" tOgeTher and there'S no KinetiC eNerGY.  All tHe iNitiaL kinetIC energY of $${1 \over 2} m ({v \OvER 2})^2+ {1 \over 2} m ({V \Over 2})^2$$
is lOST iN the cM frame.  You were anaLYzINg the collision In a non-cM FRaME!
proBleM 2  In the wet cLaY probLEm, you caN MoDEL YouR Wall as an infinIte mass (ok, teCHniCally, tHe WalL Is glueD to thE eARth, And so you couLd usE the earth As the 2nD Mass).  TheN For all iNtents And PurPose, THe CeNteR oF MasS FrAme IS thE earth, coZ, wElL the eArth IS PREtty HeaVy anD domiNates the CM.  All The KineTIc eNergy Is losT in tHe Frame Of the wAll/eaRtH as you observe!

 Q:

CReatE a QDockWiDgeT tHat ReSizes TO it's coNteNts

i have an ApplicaTIon WhERE FiXed-size child widgetS nEED tO be added PrograMAtIcALly to a doCk WidGet aT RUn timE basED oN user inpUt. I wanT To AdD these wIdGets to A dOck On tHe Qt::RIGhtDOckAreA, from top To botTOm until it runs oUT of space, then cREaTE A nEW colUmn And repeat (esSentIAlly Just THe RevERse of The flOw LAyOUt example here, which I CaLl a fluIdGriDLayout)
I can geT the dock wiDGET to resizE itsELf PRoperly using an Event Filter, but tHE resized Dock's Geometry Doesn't chaNGE, and some Of tHe wIdgEts ARE dRawn outside of THE maiN wIndow. InTerEstinglY, reSizIng The MaIn window, oR floatinG aNd UnFlOatIng thE Dock causE iT to 'PoP' baCk intO The rigHt plaCe (I hAvEn'T BeeN able to FInD A Way tO rEpLicaTe tHiS progRamaTIcaLly howeVer)
I can't uSe aNY of tHe BuIlt-in QT Layouts becausE wIth the widgEtS in My real PROgram, theY end up also getting drawn oFF screen.
is tHere sOme wAy that I caN geT the doCk tO Update It's top Left cOoRdiNATe to tHE PrOpeR pOsition oncE IT haS been ReSizeD?
I think This may be of general INteRest as getting IntUitiVE LaYouT MaNAgeMeNT beHAVior for dock widgEts in QT
 fact you are missing. 
Pr oblem 1: I f you  co mpu te  the  pro blem of 2 equa l  mas ses, one a rest and th e oth er movi n gto co llision at s pee d$v $,in th e cen ter  of mas s frame, t hos e2 masses are mo ving at $v /2$  and $-v/2$tow ards e ac h o t her. Th e fin al sta t e the2 massesar e  "stuc k " toget h e randthere's no kineti c  e n ergy.  All the  initi al ki n e tic  en ergy of $$ {1  \ove r  2} m ( { v\ o v er2 })^2+ {1 \ove r 2} m ({v\ ove r 2})^ 2$ $
i s  lostin th eC M f rame.  Youwere  analyzin g thec ollisio n  in a n on-CMfra me! 
Pro b le m2 In the we t c l ayproblem,  y ou  canmode l y o ur w all  asan in finite mass ( ok,  tec h nic ally,  thewall  i s glu ed tothe e ar th, and so youcoul d use the  ea rt h a sthe 2 n d mass ). Th en forall int e nts  a n d pu rpose, the centerof m as s frameis the ea rt h , coz, w el l t he e a r th is  pre t ty  heavy a nd dom i na te s the C M.   Allth e k ine tic e n ergy  is lo st in th e fra m e of the wall/ e arth as you o b se r v e! 
 Q: 

C reate a QDo ckWi d getthat re siz e s toit'sco n te n ts

I have an appli ca tion w herefixed-size ch ild widget s n eed to b e ad d ed programaticall y toa dock wid g et at ru n tim e basedon user i n p ut. I wa nttoadd  th e s ewidgets to ad o ck o nthe Qt: :Ri ghtDock Are a,fro m t op  to botto m untilit  r un sout  of s p ace, the ncre at e a  newc olumnand r epea t(e s sen tiallyj us t there ve rseofth e flo w la y out  exampl e here, w hic h  I c al la fluid GridLayout)
I  c an get the  d ock  widge t to resiz e itself properly using an even t f ilter , bu t the res ize d dock 'sg eometr y does n't c ha nge , and s o m eofth e widgetsa r e d rawnou tsid e of th e main window. Int e res tingly, resiz ing  the m ai n w i nd o w,or flo a t ing and unfloat ing the do ck ca use it to' pop 'back in to theright place ( I haven't  been abl eto f i n d a  way to re plicatethis prog r amati c al ly ho wev er)
Ica n't  useany of the  buil t-in Q Tlayout s bec au se withthe widgets in my realprogra m, th eyend up al sog ett ing drawn  off  screen.
I s t her e som e w a y tha t Ic an  ge t  thedock to update it 'st o pleft coordi n a t e t o the  pr o per po siti on once it has be e n resized?
I t hink t his  ma y  beof  general inter est  a s gettingin tuitive lay out mana ge m ent b ehavio r fordock wi d g et s  in QT 
 fact_you are_missing. 
Problem 1: If_you compute_the_problem of_2_equal masses, one_a rest and_the other moving to_collision at speed_$v$,_in the center of mass frame, those 2 masses are moving at $v/2$ and_$-v/2$_towards each_other.__The final state the 2_masses are "stuck" together and_there's no_kinetic energy.  All the initial kinetic energy_of_$${1 \over 2}_m ({v \over 2})^2+ {1 \over 2} m ({v_\over 2})^2$$
is lost in the CM_frame.  You_were_analyzing_the collision in a_non-CM frame!
Problem 2  In the_wet clay problem, you can model_your wall as an infinite mass (ok,_technically, the wall is glued to_the earth, and so you_could use_the earth as the 2nd_mass).  Then_for all_intents and purpose,_the center of mass frame is_the earth, coz,_well the earth is pretty heavy_and_dominates the CM.__All_the kinetic_energy is lost_in_the frame_of_the wall/earth as you observe!

 Q:

Create_a_QDockWidget that resizes to it's contents

I have_an application where fixed-size_child_widgets need to be_added programatically to a dock_widget at run time based on_user input._I want_to add these widgets to a dock on the Qt::RightDockArea, from_top to bottom until it runs_out of space, then_create a_new_column and repeat_(essentially_just the_reverse of the flow layout example here,_which I_call a fluidGridLayout)
I can get the_dock widget to resize_itself_properly using an event filter, but_the resized dock's geometry doesn't change,_and some of the widgets_are_drawn_outside of the main window._Interestingly, resizing the main window, or_floating and unfloating_the dock cause it to 'pop' back_into_the right place (I haven't been_able_to find a way to replicate_this_programatically_however)
I can't use any of_the built-in QT layouts because with_the widgets in my real program, they end up_also getting drawn_off screen.
Is there some way_that_I_can get the dock to update it's top left coordinate_to the_proper position once_it has been resized?
I think this may be of general_interest as getting intuitive layout management behavior_for dock widgets in QT