Results 1 to 7 of 7

Thread: Window Style: No border but resizable

  1. #1
    Join Date
    Oct 2009
    Posts
    70
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Window Style: No border but resizable

    Hi guys, I've got problems with MainWindow styling...I need to set up WindowFlags to disable borders but window must be still resizable.
    When I tried to use Qt::SplashScreen, Qt::FramelessWindowHint, it was okay but not resizable...When I used Qt::CustomizeWindowHint it was resizable but with border, which is not configurable...How to resolve it? Some WinAPI cheats ? (Yea, this app will runs only on Windows). My current system is Windows XP.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Window Style: No border but resizable

    Why do you want to do that?

  3. #3
    Join Date
    Oct 2009
    Posts
    70
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Window Style: No border but resizable

    I want to make skinable window...do you have any ideas? Maybe it is wrong way...

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Window Style: No border but resizable

    The drawing of the actual windows is not done in Qt but by the window manager of your operating system.
    The correct way to skin your windows is to use the style options of your window manager.

    If you want to follow general standards, don't mess with how the window manager draws windows.

    That said: Create a splash screen type of widget, add a label in the bottom right corner, use the mouse events of that label to resize your parent widget.

  5. #5
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Window Style: No border but resizable


  6. #6
    Join Date
    Oct 2009
    Posts
    70
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Window Style: No border but resizable

    So how do it? By WinAPI yea?

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

    Default Re: Window Style: No border but resizable

    You wil need to trace mouseEvents on your widget, change the cursor if the mouse in a specific corner.
    Then catch mouse press events and resize your widget on mouse move events.

Similar Threads

  1. costum QWidget with border-image in style sheet
    By qt fan in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2009, 20:36
  2. Replies: 2
    Last Post: 5th July 2008, 19:35
  3. Showing QWidget border around the window
    By maverick_pol in forum Qt Programming
    Replies: 2
    Last Post: 20th March 2008, 20:14
  4. making an application window non resizable
    By aegis in forum Qt Programming
    Replies: 16
    Last Post: 13th May 2007, 19:14
  5. border color is wrong with "plastique" style in Qt4.2.3
    By alfa_wu in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2007, 04:27

Tags for this Thread

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.