Results 1 to 6 of 6

Thread: [Partially-Solved] Making a window snap to the desktop's borders(& resize desktop)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: Making a window snap to the desktop's borders

    and decreases the size of the remaining desktop for other applications.
    didnt get that.

    As for snapping to desktop corner, u can catch QWidget::moveEvent and set position of widget accordingly.

    PS: another little question: is it easy to make QT windows transparent/translucent?
    This little question has big and complex answers. Search forum.
    For simple use see QWidget::setWindowOpacity

  2. #2
    Join Date
    Jan 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Making a window snap to the desktop's borders

    Thanks for the quick answer!

    and decreases the size of the remaining desktop for other applications.
    When other windows get maximized for example, they shouldn't overlap the bar. The bar is not just "always ontop", it also restricts other apps from fully maximizing.

    Any idea how to achieve that effect?

    Can also be observed in AWN in linux. (Maximized apps don't fill the AWN dock area)

    EDIT: I had thought of using a move function, what do I query to figure out the desktop's dimension and the window's position on the desktop?
    Last edited by rdrey; 30th January 2009 at 10:46. Reason: updated contents

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: Making a window snap to the desktop's borders

    I dont think it will be easy. That functionality is of window manager.
    It will be tedious if you wanna have your control.

    Also it wont be platform specific I guess

  4. #4
    Join Date
    Jan 2009
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Making a window snap to the desktop's borders

    Thanks, I had hoped that Qt has a nifty bar window class somewhere. I guess I'll have a look at how AWN does it in linux, and a friend of mine wrote a statbar for windows, that I can look at.

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
  •  
Qt is a trademark of The Qt Company.