Results 1 to 3 of 3

Thread: Need help with QToolButton

  1. #1
    Join Date
    Feb 2006
    Posts
    42
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Need help with QToolButton

    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

  2. #2
    Join Date
    Feb 2006
    Posts
    42
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Need help with QToolButton

    Sorry!! Documentation says set setAutoraise to true. But it didnt work

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Need help with QToolButton

    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.

    Qt Code:
    1. #include <QtGui>
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication a(argc, argv);
    6.  
    7. // button 1 (on the left), auto raise disabled
    8.  
    9. // button 2 (on the right), auto raise enabled
    10. b2->setAutoRaise(true);
    11.  
    12. s.addWidget(b1);
    13. s.addWidget(b2);
    14. s.show();
    15.  
    16. a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
    17. return a.exec();
    18. }
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

Similar Threads

  1. drag and drop QToolButton in QToolBar
    By NBilal in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2008, 20:11
  2. QToolButton & QPushButton
    By hrcariaga in forum Qt Programming
    Replies: 5
    Last Post: 15th July 2008, 21:17
  3. QToolButton and Style sheet
    By desch in forum Qt Programming
    Replies: 8
    Last Post: 1st December 2007, 08:38
  4. QSqlRelationalDelegate Draw a clickable QToolButton
    By patrik08 in forum Qt Programming
    Replies: 5
    Last Post: 1st March 2007, 20:59
  5. Problem with qtoolbutton
    By moowy in forum Qt Programming
    Replies: 1
    Last Post: 22nd September 2006, 13:30

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.