c++ - QT Modeless dialog window dos'nt response to the move command -


Using the Modile dialog in my application, and when I tried to use Modud dialog move command from the main window I do - Modode Dialog also showed, why? (The way I work everywhere every command and is called by the way, I'm trying to take it in Sistre era. Here's some code: M

  odelessDialog * ModelessDialog = new ModelessDialog (this); ModelessDialog- & gt; setModal (false); Modlesdilaog- & gt; set attributes (Qt :: WA_DeleteOnClose); int topLeft_x = m_SystrayReq.topLeft (). X (); int topLeft_y = M_SystrayReq.topLeft). why (); // x's wilos and y are just fine Modelessoog-> Move (top left_x, top-left_a); Modeledogyogi- & gt; Show ();  

As dialog parents, coordinates proceed () parent widget Are relative to. Your system coordinates are probably global? Then use QWidget :: mapFromGlobal () for them to map.


Comments