I have a problem with QToolButton in removing default 3D frame and outline. I don't know how to remove 3D frame and outline in QToolButton when the mouse points at it?
Somebody help me!
I have a problem with QToolButton in removing default 3D frame and outline. I don't know how to remove 3D frame and outline in QToolButton when the mouse points at it?
Somebody help me!
Last edited by Kevin Hoang; 9th March 2010 at 06:04.
ArlexBee-871RBO (9th March 2010)
How will user then know that hes about to click the button ?
What functionality you want to achieve ?
May be meanwhile you can have look at autoRaise property of QToolButton. Also if you are using QPushButton, you can use setFlat(true).
Thank you very much!
I'm using an image instead default QT button, when users points the mouse as it, it will display another image.
I didn't see setFlat function in QToolButton. Can you help me where this function is available.
ok create a own widget with a pixmap added in label1 and below label2 the text u want to display ... override the void QWidget::mousePressEvent ( QMouseEvent * event ) and emit your custom signal
this signal will be emitted when user press or click on the widget ..Qt Code:
void { if (event->button() != Qt::LeftButton) { return; } emit myOwnSignal(); }To copy to clipboard, switch view to plain text mode
"Behind every great fortune lies a crime" - Balzac
wagmare: Thank you very much!
Does it have any other ways?
then u can use autoRaise property set to true in QToolButton what aamer suggest .... its the only option ..
use setIcon(const QIcon icon) of QToolButton to set the image and set toolButtonStyle() to Qt::ToolButtonTextUnderIcon
"Behind every great fortune lies a crime" - Balzac
Bookmarks