Results 1 to 2 of 2

Thread: Correct usage of setWindowFlags()?

  1. #1
    Join Date
    Oct 2011
    Location
    Australia
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Correct usage of setWindowFlags()?

    Hi,

    All the code Im looking at does this:

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

    but shouldnt the correct usage in most cases be to specifically set or unset specific flags rather than presumably clobbering all of them. As in general you dont know which flags might be set on a given type of widget? E.g.:

    Qt Code:
    1. x.setWindowFlags( x.windowFlags() | Qt::SomeFlag )
    To copy to clipboard, switch view to plain text mode 

    Thanks.

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: Correct usage of setWindowFlags()?

    Yes, absolutely.

Similar Threads

  1. 100% correct usage of QSharedData
    By coder2012 in forum Qt Programming
    Replies: 4
    Last Post: 21st May 2012, 01:14
  2. Correct usage of QThread
    By Patrik in forum Qt Programming
    Replies: 6
    Last Post: 8th February 2012, 15:54
  3. Replies: 1
    Last Post: 9th May 2011, 13:16
  4. Qt Jambi: How I can use setWindowFlags()?
    By el_Diablo in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2008, 21:23
  5. setWindowFlags(Qt::FramelessWindowHint)
    By smarinr in forum Qt Programming
    Replies: 5
    Last Post: 30th April 2008, 20:12

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.