Results 1 to 8 of 8

Thread: QWidgte::move(int x, int y) beyond the screen boundaries

  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default QWidgte::move(int x, int y) beyond the screen boundaries

    Can anybody tell me why QWidget::move only moves the Widget to the width and height returned by QWidgetDesktop::availableGeometry() minus the width and height of the widget itself but not any further? I'd like to implement a Widget that comes up like a slide in the bottom right corner of the Screen but have difficulties due to the problem described above :-(

    Any help is appreciated.
    thanx in advance
    momesana

    p.s. I just tried this with e17 and there it seems to work. I am primarily working with KDE-3.5.x. Maybe its another windowmanager Pecularity as described in file:///usr/local/Trolltech/Qt-4.2.2.../geometry.html
    :-(
    Last edited by momesana; 14th February 2007 at 18:16.

  2. #2
    Join Date
    Sep 2006
    Posts
    68
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWidget::move(int x, int y) beyond the screen boundaries

    I was just about to ask exactly the same question.. am doing the same thing!

    I see no reason why it would not be allowed, as I can physically move a QT window half off the screen.. but using the move( x, y) function wont let me do it :-(

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QWidget::move(int x, int y) beyond the screen boundaries

    Quote Originally Posted by December View Post
    I was just about to ask exactly the same question.. am doing the same thing!

    I see no reason why it would not be allowed, as I can physically move a QT window half off the screen.. but using the move( x, y) function wont let me do it :-(
    The same thing with Gnome! Although slightly different in behaviour.
    Here a little video showing off the issue:
    http://www.informatik.uni-bremen.de/...ing_window.ogg
    Btw, I thing we are working on the same feature ... :-D

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QWidgte::move(int x, int y) beyond the screen boundaries

    Hi,

    I've attached a file (main.h) to this post which contains a complete example app for the purpose of illustrating the issue.
    compile it as usual: qmake -project && qmake && make
    place the slidewidget somewhere in the middle of the screen and repeatedly press the showbutton on the other window. Then try the same thing when the slidewidget is at the alined against the top or bottom of the screen.

    cheers
    momesana

    p.s. The issue doesn't show up on windows.
    Attached Files Attached Files
    Last edited by momesana; 15th February 2007 at 23:42.

  5. #5
    Join Date
    Sep 2006
    Posts
    68
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWidgte::move(int x, int y) beyond the screen boundaries

    I don't think its the windows manager.. as I've seen it done pretty well with GTK (gaim guifications does it), and that program works fine under Gnome and KDE (I don't have Windows, so can't test that).

    It looks like if you manually move the window so it overlaps the edge of the screen, the slide-out works fine, but otherwise, even though the Y position is being changed, the widget refuses to move!

    Anyone got any ideas here?

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QWidgte::move(int x, int y) beyond the screen boundaries

    Quote Originally Posted by December View Post
    I don't think its the windows manager.. as I've seen it done pretty well with GTK (gaim guifications does it), and that program works fine under Gnome and KDE (I don't have Windows, so can't test that).
    That's wrong. It definetly _is_ the window manager! I've just tested it with KDE in combination with Beryl and even more interesting, I tested it with the default wm shipped with X.org (xwm?) and there is works (though the animation has a million other issues on xwm...). It is _only_ because of the policy of the window manager.

    Below is a list of desktop environments/wm's that I've tested:

    Enlightenment 17 (works)
    Gnome-2.16.2 / Metacity (doensn't work)
    KDE-3.5.5 / kwin (doesn't work)
    KDE-3.5.5 / Beryl (does work)
    KDE-3.5.5 / Metacity (doesn't work)
    X11/xwm or whatever its called (works)
    Win2k (works)
    WinXP (works)

    However this does not mean that it is a bug. It's just the way they behave and there must be a way to tell the wm how you want the window to work. I was on the kde irc channels and they told me I should look into NETWM check for details here and here.

    Thas may be the way the other apps (gaim, forecastfox etc.) achieve this effect. Tell me if you make any progress :-)

    cheers
    momesana
    Last edited by momesana; 16th February 2007 at 21:28.

  7. #7
    Join Date
    Sep 2006
    Posts
    68
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWidgte::move(int x, int y) beyond the screen boundaries

    Well, I ended up doing it by making a frame that filled my whole widget, and then resizing and moving the widget at the same time until it reached 1px high, then hiding it.

    This looks exactly the same as sliding the window out, and seems to work fine.

    Now if only I could figure out how to get rid of the taskbar entry when the window shows.. the main application window is already hidden, but when I show the popup it adds a mew taskbar entry. I think there are some flags to deal with that somewhere..

  8. #8
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QWidgte::move(int x, int y) beyond the screen boundaries

    I will try out your solution with the frames. As for the taskbar entry, one can avoid to have a Taskbar entry for a Widget/Dialog by making sure the dialog has a parent. In this case the dialog would share the same taskbar entry as the parent (mostly a QMainWindow). But I don't know how the whole think behaves if the parents taskbar entry is hidden.

    cheers
    momesana

Similar Threads

  1. how to enable touch screen in qt/embedded
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 8
    Last Post: 25th March 2011, 10:44
  2. QTimer based Splash Screen
    By bpetty in forum Newbie
    Replies: 6
    Last Post: 15th December 2006, 00:51
  3. hiding mouse on second screen
    By safknw in forum KDE Forum
    Replies: 1
    Last Post: 24th November 2006, 11:09
  4. hide/show screen update problem
    By SkripT in forum Qt Programming
    Replies: 2
    Last Post: 6th February 2006, 17:49
  5. Problem with screen update...
    By mysearch05 in forum Qt Programming
    Replies: 2
    Last Post: 27th January 2006, 18:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.