[Qt-interest] Modeless dialog window dos'nt response to the move command
Meir Yanovich
meiry242 at gmail.com
Tue May 18 13:48:07 CEST 2010
Thanks i will try to implement it
On Tue, May 18, 2010 at 2:38 PM, Andre Somers <andre at familiesomers.nl>wrote:
> On 18-5-2010 13:25, Meir Yanovich wrote:
>
> Thanks for the replay , so how can i bound the window to the systray icon
> ?
>
> On Tue, May 18, 2010 at 12:02 PM, Andre Somers <andre at familiesomers.nl>wrote:
>
>> On 18-5-2010 10:53, Diego Iastrubni wrote:
>>
>> On Tue, May 18, 2010 at 11:33 AM, Andre Somers <andre at familiesomers.nl>wrote:
>>
>>> Why do you assume that the coorinate from QSystemTrayIcon is wrong? The
>>> topleft of the system tray icon is (probably) on the very bottom of the
>>> screen, on your taskbar. Do you really think moving a window to that
>>> position (note, you are setting the position of the topleft corner of
>>> that window!) is going to result in a visible window? On my setup at
>>> least, windows will slide *under* the taskbar...
>>>
>>>
>> Not to mention that this will break setup in which the tray icon is on
>> the top, or setups in which the user moved the panels to the sides.
>>
>> Which is what I meant by: "Note that this won't work on systems that
>> don't have their taskbar where you expect it to be..."
>>
>> André
>>
>
> OK, so one way is to apply some heuristics. To quote myself again:
>
> What may help is making sure that instead of trying to display the
> topleft corner on the position of the system tray icon, you try to
> position your window so the bottom right corner ends up there. How you
> can do that, I'll leave as an excersise to the reader.
>
> That would work in the case where the systemtray is in the bottom right
> corner of the screen. If it is on the top, you will need to position your
> window *under* the icon. And if it is on the left, it will need to go to the
> right. Etc. QDesktopWidget can help you to get the geometry of the
> screen(s). Relate that to the position you get for the system tray icon, and
> you can figure out relatively reliable on what side of the system tray icon
> your window should appear.
>
> André
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100518/6c3c05dd/attachment.html
More information about the Qt-interest-old
mailing list