Results 1 to 11 of 11

Thread: Looking For Most Appropriate/Efficient Way Of Resizing A Frameless Window

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Looking For Most Appropriate/Efficient Way Of Resizing A Frameless Window

    I would probably implement a "charm" that could be applied on a widget consisting of an event filter that would intercept mouse-move events and modify the geometry of the widget. If I wanted to have cursor changes while moving along the borders of the window I would also enable mouse tracking for the widget as part of my charm. One can also check the code for controlling sub-windows of QMdiArea.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    Sean (25th October 2010)

  3. #2
    Join Date
    Oct 2010
    Posts
    6
    Thanks
    2

    Default Re: Looking For Most Appropriate/Efficient Way Of Resizing A Frameless Window

    Thanks for your opinion! I care a lot about how much computational resource my algorithm consumes and that's why I posted this thread in the first place. If I keep tracking the mouse inside the window and calculating the corresponding geometry, will that be too much computation for such a simple task? Since the code we write through regular C++/QT statements are user-level code, and there are machine/OS dependent instructions/APIs which utilize hardware acceleration for such purposes. And QT use lots of them internally to improve its efficiency, just like video game developers regularly utilize video card facilities.

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Looking For Most Appropriate/Efficient Way Of Resizing A Frameless Window

    Hardware acceleration or anything like it will not help you determine whether you are at a window border or not. If you want to have such information inside your application, you need mouse tracking. The only alternative is to rely on the windowing system by not applying a custom skin and using the default decorations instead.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #4
    Join Date
    Oct 2010
    Posts
    37
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Looking For Most Appropriate/Efficient Way Of Resizing A Frameless Window

    Quote Originally Posted by Sean View Post
    just like video game developers regularly utilize video card facilities.
    This is not the case. Engine developers do that and game developers use the engine. In the same way that gui library programmers handle the gritty details and application programmers use the library. Game programming is a large part scripting and setting up events. There's not much 3D programming done apart from writing the odd shader or maybe using a fragment program to speed a physics calculation (in extreme cases).

    I can't pretend to know your situation here, but if you're using Qt then likely you're not resource stricken- why are you rolling your own gui?

  6. The following user says thank you to genjix for this useful post:

    Sean (26th October 2010)

  7. #5
    Join Date
    Oct 2010
    Posts
    6
    Thanks
    2

    Default Re: Looking For Most Appropriate/Efficient Way Of Resizing A Frameless Window

    You are right. I'll track the mouse by myself to implement the resizing code.

    Quote Originally Posted by genjix View Post
    This is not the case. Engine developers do that and game developers use the engine. In the same way that gui library programmers handle the gritty details and application programmers use the library. Game programming is a large part scripting and setting up events. There's not much 3D programming done apart from writing the odd shader or maybe using a fragment program to speed a physics calculation (in extreme cases).

    I can't pretend to know your situation here, but if you're using Qt then likely you're not resource stricken- why are you rolling your own gui?
    Thanks for your advice! I'm gonna rely on what QT provides.

Similar Threads

  1. Resize handling of frameless window
    By Peppy in forum Qt Programming
    Replies: 5
    Last Post: 2nd June 2010, 20:48
  2. Replies: 0
    Last Post: 14th April 2010, 22:26
  3. Replies: 3
    Last Post: 2nd March 2010, 20:58
  4. KWin's shadows and frameless window
    By EuroElessar in forum KDE Forum
    Replies: 4
    Last Post: 12th July 2009, 16:16
  5. [QT4] Any way to disable window resizing ?
    By Amalsek in forum Qt Programming
    Replies: 5
    Last Post: 15th May 2006, 11:36

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.