Results 1 to 2 of 2

Thread: Converting Colorful Screen to Monochrome Display ??

  1. #1
    Join Date
    Feb 2015
    Posts
    6
    Qt products
    Qt4

    Default Converting Colorful Screen to Monochrome Display ??

    Hi all,
    There is an app which includes colorful screens. And, I chould convert these screens to monochrome displays.
    Is there any proposal which indicates a gap says that this color refers to black, and this color refers to white for monochrome. I mean, when I give the related color as param, I should get back black or white according to this gap.

    Thanks in advance for the replies ,
    Cranberries

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,349
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: Converting Colorful Screen to Monochrome Display ??

    If you set a customized QPalette or custom QStyle for the application, then all widget palettes / styles should inherit from the palette / style set in QApplication. If you want to convert an RGB color to gray use the qGray() function (see QColor for documentation). This returns a value between 0 - 255. If you want black or white only, then just divide this range in half and set everything < 128 to black, everything > 127 to white.

Similar Threads

  1. Replies: 3
    Last Post: 18th July 2013, 07:16
  2. Auto threshold value of monochrome conversion
    By M. Bashir in forum Qt Programming
    Replies: 5
    Last Post: 26th November 2009, 12:17
  3. converting image into monochrome format
    By aj2903 in forum Qt Programming
    Replies: 2
    Last Post: 13th November 2009, 15:53
  4. How to Keep Splash Screen and App on Same Display
    By ajb_advance in forum Qt Programming
    Replies: 2
    Last Post: 4th March 2009, 11:49
  5. Making one row colorful of a table in qt3
    By omprakash in forum Qt Programming
    Replies: 1
    Last Post: 26th July 2008, 00:11

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.