Results 1 to 5 of 5

Thread: transparence of Color in qt3???

  1. #1
    Join Date
    Apr 2006
    Posts
    21
    Thanks
    6

    Default transparence of Color in qt3???

    hello ,

    Can i define the transparence of color with Qt3.4?
    I mean that qt 4 define QRgba.

    thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: transparence of Color in qt3???

    Hm...qRgba available in Qt3..what you want to do?
    a life without programming is like an empty bottle

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

    Stephano (17th May 2006)

  4. #3
    Join Date
    Apr 2006
    Posts
    21
    Thanks
    6

    Default Re: transparence of Color in qt3???

    QColor *couleur=new QColor( qRgba ( 255,0,0,0 ) , 0xffffffff ) ;
    tab_text[text_actif]->setPaletteBackgroundColor(*couleur);

    but, what value of "a" in the expression (BOLD) make the text transparent?

  5. #4
    Join Date
    Apr 2006
    Posts
    21
    Thanks
    6

    Default Re: transparence of Color in qt3???

    When i define QRgba with 'a'=0,
    the color will nt be transparent..
    So, please,what 's the problem?

    Thanks to all!!!!!!!!!!

  6. #5
    Join Date
    May 2006
    Location
    Bangalore
    Posts
    23
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: transparence of Color in qt3???

    I think alpha in QColor is just to be used with qglColor() only. (When you use QGLWidget for OpenGL)

    From the QT docs:
    ---------------------------
    QGLWidget::qglColor ( const QColor & c ) const
    Convenience function for specifying a drawing color to OpenGL. Calls glColor3 (in RGBA mode) or glIndex (in color-index mode) with the color c. Applies to the current GL context.

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.