Results 1 to 6 of 6

Thread: setWindowFlags(Qt::CustomizeWindowHint) - title bar

  1. #1
    Join Date
    Jul 2010
    Location
    Poland
    Posts
    184
    Thanks
    70
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default setWindowFlags(Qt::CustomizeWindowHint) - title bar

    Hello!

    I've set flags to my window:

    Qt Code:
    1. setWindowFlags(Qt::CustomizeWindowHint);
    To copy to clipboard, switch view to plain text mode 

    I wanted to get rid od all icon on title bar, and also title. It works but I still can see something like title bar - not the whole window have "border". There is no "border" in the place where title bar is - can I do something with it? If it helps - it's application for ARM.

    And one more question - is there an flag to make window unmovable?

    thanks in advance
    best regards
    Tomasz

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: setWindowFlags(Qt::CustomizeWindowHint) - title bar

    About the unmoveable window: There was a thread about that topic a year ago, try to find it via the search. One possibility I can remember right now is to reimp QWidget::moveEvent() and revert the movement.

  3. The following user says thank you to Lykurg for this useful post:

    Tomasz (17th August 2010)

  4. #3
    Join Date
    Aug 2007
    Posts
    166
    Thanks
    16
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: setWindowFlags(Qt::CustomizeWindowHint) - title bar

    Also use Qt::FramelessWindowHint for the window flag and you will get rid of the border.

  5. The following user says thank you to The Storm for this useful post:

    Tomasz (18th August 2010)

  6. #4
    Join Date
    May 2009
    Location
    Canada
    Posts
    163
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows Android

    Default Re: setWindowFlags(Qt::CustomizeWindowHint) - title bar

    Quote Originally Posted by The Storm View Post
    Also use Qt::FramelessWindowHint for the window flag and you will get rid of the border.
    You will also get rid of the ability to move, minimize, or close the window, including via the Windows Task Manager.

  7. The following user says thank you to Urthas for this useful post:

    Tomasz (18th August 2010)

  8. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: setWindowFlags(Qt::CustomizeWindowHint) - title bar

    Quote Originally Posted by Urthas View Post
    You will also get rid of the ability to move, minimize, or close the window, including via the Windows Task Manager.
    Not on Linux! You still can move any window by holding ALT und mouse click/move. Isn't that also possible with windows?

  9. #6
    Join Date
    Sep 2009
    Posts
    31
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: setWindowFlags(Qt::CustomizeWindowHint) - title bar

    Hi,
    I've similar question. I would like to use widget in QGraphicsScene and manage what is shown on top (close button, title, etc.). But then there are some ambiguities. If I add widget using QGraphicsScene::addWidget(), widget (e.g. QDialog) is alway without frame (and buttons, title on top), regardless on flags. But if I use QGraphicsScene::addItem() to QGraphicsProxyWidget which I create from e.g. QDialog, widget shown on scene is always with frame regardless on flags.

    Aren't flags supported inside QGraphicsScene? Or am I doing something wrong? Some ideas?

    Thanks.

Similar Threads

  1. Questions about Qt::CustomizeWindowHint
    By lalesculiviu in forum Qt Programming
    Replies: 0
    Last Post: 3rd July 2010, 13:12
  2. Qt Jambi: How I can use setWindowFlags()?
    By el_Diablo in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2008, 22:23
  3. setWindowFlags(Qt::FramelessWindowHint)
    By smarinr in forum Qt Programming
    Replies: 5
    Last Post: 30th April 2008, 21:12
  4. enterEvent, leaveEvent, setWindowFlags
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2007, 10:15
  5. QDialog::setWindowFlags() problem
    By Lemming in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2006, 16:26

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.