Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, April 2007
QPushButton highlighting


Message 1 in thread

How do I go about highligting a QPushButton when the mouse moves over it? (It does it automaticlly when with the QPlastiqueStyle and setFlat is set to FALSE but when I set setFlat to TRUE it doesn't work)

Code-
QPushButton* processBtn1 = new QPushButton(processWidget);
processBtn1->setStyle(new QPlastiqueStyle);
processBtn1->setFlat(TRUE);

Thanks,
Rog



       
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

Message 2 in thread

You can try setting the palette for the color role QtPalette::Highlight and QtPalette::HighlightedText.  See the assistant searching for QPalette.


----- Original Message ----
From: roger t <roger90902003@xxxxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Tuesday, April 10, 2007 3:23:09 PM
Subject: QPushButton highlighting

How do I go about highligting a QPushButton when the mouse moves over it? (It does it automaticlly when with the QPlastiqueStyle and setFlat is set to FALSE but when I set setFlat to TRUE it doesn't work)

Code-
QPushButton* processBtn1 = new QPushButton(processWidget);
processBtn1->setStyle(new QPlastiqueStyle);
processBtn1->setFlat(TRUE);

Thanks,
Rog



      We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.



Message 3 in thread

It' say default color is set to blue, but I don't see any color? So I don't think this the  issue but I will try to set it and see if it makes a difference.

Thanks,
R

----- Original Message ----
From: "susan@xxxxxxxxxxxx" <susan@xxxxxxxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Tuesday, April 10, 2007 12:34:14 PM
Subject: Re: QPushButton highlighting

You can try setting the palette for the color role QtPalette::Highlight and QtPalette::HighlightedText.  See the assistant searching for QPalette.


----- Original Message ----
From: roger t <roger90902003@xxxxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Tuesday, April 10, 2007 3:23:09 PM
Subject: QPushButton highlighting

How do I go about highligting a QPushButton when the mouse moves over it? (It does it automaticlly when with the QPlastiqueStyle and setFlat is set to FALSE but when I set setFlat to TRUE it doesn't
 work)

Code-
QPushButton* processBtn1 = new QPushButton(processWidget);
processBtn1->setStyle(new QPlastiqueStyle);
processBtn1->setFlat(TRUE);

Thanks,
Rog



      We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.









       
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

Message 4 in thread

In my application, I am using QPalette color settings to change the color for almost
everything and it works nicely.  My app also needs to change the color completely 
when, say, a push button is pressed.  So I've derived from QPushButton and intercept the signals when the button is pressed, released, etc., changing the palette, back and forth.  This works quite well.  I have also used QPalette::Highlight to change the highlight color, generally.  This also works, but according to the style.  In Plastique, the highlight for a pushbutton is shadows (lines) at the top and bottom of the button.  In Cleanlooks, its a gradient.  So it depends on the style.  If you need a complete change from that you have a couple choices (1) derive your own style, or (2) you try intercepting the mouse hovering (probably mouse motion) and change the palette on the fly.

HTH & Good luck,
Susan

----- Original Message ----
From: roger t <roger90902003@xxxxxxxxx>
To: susan@xxxxxxxxxxxx; qt-interest@xxxxxxxxxxxxx
Sent: Tuesday, April 10, 2007 7:34:29 PM
Subject: Re: QPushButton highlighting

It' say default color is set to blue, but I don't see any color? So I don't think this the  issue but I will try to set it and see if it makes a difference.

Thanks,
R

----- Original Message ----
From: "susan@xxxxxxxxxxxx" <susan@xxxxxxxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Tuesday, April 10, 2007 12:34:14 PM
Subject: Re: QPushButton highlighting

You can try setting the palette for the color role QtPalette::Highlight and QtPalette::HighlightedText.  See the assistant searching for QPalette.


----- Original Message ----
From: roger t <roger90902003@xxxxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Tuesday, April 10, 2007 3:23:09 PM
Subject: QPushButton highlighting

How do I go about highligting a QPushButton when the mouse moves over it? (It does it automaticlly when with the QPlastiqueStyle and setFlat is set to FALSE but when I set setFlat to TRUE it doesn't
 work)

Code-
QPushButton* processBtn1 = new QPushButton(processWidget);
processBtn1->setStyle(new QPlastiqueStyle);
processBtn1->setFlat(TRUE);

Thanks,
Rog



      We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.










       Looking for earth-friendly autos? 
 Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.