Results 1 to 2 of 2

Thread: How to specify RGB color in Qt?

  1. #1
    Join Date
    Nov 2007
    Posts
    7
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to specify RGB color in Qt?

    In MFC we have COLORREF value is used to specify an RGB color. I need the exact replacemnet for COLORREF using Qt. How to specify RGB color in Qt? Can you help me anyone... thanks in advance!!!

  2. #2
    Join Date
    Nov 2007
    Posts
    51
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default Re: How to specify RGB color in Qt?

    Greetings.

    From Assistant:

    "typedef QRgb
    An ARGB quadruplet on the format #AARRGGBB, equivalent to an unsigned int.

    Note that the type also holds a value for the alpha-channel. The default alpha channel is ff, i.e opaque. For more information, see the Alpha-Blended Drawing section.

    See also QColor::rgb() and QColor::rgba()."

    Basically check the description of the QColor class, the answer lies there.

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

    krishbhala (20th December 2007)

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.