[Qt-interest] QPushButton style sheet issue; setting border color is effecting pushbutton's look and feel

Malyushytsky, Alex alex at wai.com
Fri Jul 31 23:23:56 CEST 2009


According to my understanding border is part of the graphical elements which creates the  button look.
The exact look depends on the style of button presentation.
Changing thickness of the border seems is breaking  visual concept of the button in the style you are using.
Have you tried not to change thickness?

Regards,
   Alex

From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Santhosh Y
Sent: Thursday, July 30, 2009 11:42 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] QPushButton style sheet issue; setting border color is effecting pushbutton's look and feel

Hi,

Please find the attached push button with the mail.

When I tried to set style for marking a border with a color for QPushbutton,  it no more looks like a Pushbutton.
In the image I attached with this mail, for 3-buttons I have set the border colors and for 1-button I haven't set.

My requirement is that, I am able to set a border color and the button should look like a QPushbutton.

Can I do this?
Please anyone can guide me in doing so. Thanks in advance

----------------------------------------------------------------------------------------
//// /Here is the piece of code
    QPushButton* d2dRF = new QPushButton ("");
    d2dRF->setFixedWidth (100);

    QPushButton* d2dTx = new QPushButton ("");
    d2dTx->setFixedWidth (100);
    d2dTx->setStyleSheet ("border: 4px solid red");

    QHBoxLayout* rbitems =  new QHBoxLayout();
    rbitems->addWidget (d2dRF);
    rbitems->addWidget (d2dTx);

    QPushButton* r2a = new QPushButton ("");
    r2a->setFixedWidth (100);
    r2a->setStyleSheet ("border: 4px solid magenta");

    QPushButton* d2m = new QPushButton ("");
    d2m->setFixedWidth (100);
    d2m->setStyleSheet ("border: 4px solid cyan");

    QHBoxLayout* rbitems2 =  new QHBoxLayout();
    rbitems2->addWidget (r2a);
    rbitems2->addWidget (d2m);

// setting in group box
    QGroupBox* rbGB = new QGroupBox ("");
    QVBoxLayout* totalrbitems =  new QVBoxLayout(rbGB);
    totalrbitems->addLayout (rbitems);
    totalrbitems->addLayout (rbitems2);


--

----------------------------------------------------

Y Santhosh Kumar

Senior Software Engineer

SoftJin Technologies Private Limited

Unit No. 102, Mobius Tower,

I Floor, SJR I - Park,

EPIP, White Field,

Bangalore - 560066, India

U : www.softjin.com<http://www.softjin.com>

E : santhosh at softjin.com<mailto:santhosh at softjin.com>

T : +91-80-41779999

M : +91-9740535265

----------------------------------------------------





Business Disclaimer

____________________________________________________________

This e-mail message and any files transmitted with it are intended solely

for  the use  of the  individual or entity  to which they  are  addressed. It

may  contain confidential,  proprietary or legally  privileged  information.

If  you  are  not  the  intended recipient please be advised that you have

received  this  message in error and any use is strictly prohibited. Please

immediately  delete it  and all copies of it from your system, destroy any

hard  copies  of  it and  notify  the  sender  by return mail. You must not,

directly or indirectly, use,  disclose,  distribute, print, or copy any part of

this message if you are not the intended recipient.

___________________________________________________________


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

"Please consider our environment before printing this email."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090731/4ded04c2/attachment.html 


More information about the Qt-interest-old mailing list