Results 1 to 7 of 7

Thread: How to set the BORDER COLOR of QDialog?

Hybrid View

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

    Default Re: How to set the BORDER COLOR of QDialog?

    You can get rid of the frame by using QWidget::setMask() or by removing all the decorations by setting the FramelessWindowHint before showing the window. Either way this will remove the frame, not change its colour.

  2. #2
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    8
    Thanked 14 Times in 14 Posts

    Default Re: How to set the BORDER COLOR of QDialog?

    Quote Originally Posted by wysota View Post
    You can get rid of the frame by using QWidget::setMask() or by removing all the decorations by setting the FramelessWindowHint before showing the window. Either way this will remove the frame, not change its colour.
    Dear Sir!
    That means frames colour cann't be changed in Qt4.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

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

    Default Re: How to set the BORDER COLOR of QDialog?

    That's what I said in the beginning

  4. #4
    Join Date
    Aug 2006
    Posts
    250
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    19
    Thanked 49 Times in 36 Posts

    Default Re: How to set the BORDER COLOR of QDialog?

    You can't influence the frame colour using any toolkit. This is not Qt specific. The only way to fake it is to make your window frameless, then draw the titlebar and frame manually. Some windows apps tend to do this. That's usually a bad idea though, since users won't like your non-standard app, and you have to reimplement things like window movement and minimize/maximize/close buttons yourself. Lots of work for a minor cosmetic issue.

Similar Threads

  1. Resizing a QDialog to the content size
    By Nyphel in forum Qt Programming
    Replies: 8
    Last Post: 15th March 2007, 08:16

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.