PDA

View Full Version : Need help with QToolButton



Seema Rao
22nd April 2006, 15:29
Whenever mouse points QToolButton, it draws 3D frame around itself. I checked this in documentation, by setting setAutoRaise() to false you can disable it.I tried, it didnt work.
Can some body explain how to disable it?

Thanks in advance,
Seema Rao

Seema Rao
22nd April 2006, 15:32
Sorry!! Documentation says set setAutoraise to true. But it didnt work

jpn
22nd April 2006, 15:55
Err? You want it to be enabled or disabled?
Auto raise is disabled (false) by default. You can enable it by setting it to true.



#include <QtGui>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);

// button 1 (on the left), auto raise disabled
QToolButton* b1 = new QToolButton;

// button 2 (on the right), auto raise enabled
QToolButton* b2 = new QToolButton;
b2->setAutoRaise(true);

QSplitter s;
s.addWidget(b1);
s.addWidget(b2);
s.show();

a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
return a.exec();
}