Results 1 to 4 of 4

Thread: QAction Icon

  1. #1
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    46
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    7

    Default QAction Icon

    Hi

    how can i make big icon of the QAction .

    please give me your useful advice.

    Thanks
    Ashish Kumar Saryar

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: QAction Icon

    look at these properties QToolBar::setIconSize and QToolBar::setToolButtonStyle.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    46
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    7

    Default Re: QAction Icon

    hi

    i am adding action in menu.. so i can't get how size of the action will increase.
    my code is like this:

    Qt Code:
    1. QMenu *pOperationMenu = new QMenu();
    2.  
    3. QAction *actAdd = new QAction(pOperationMenu);
    4. actAdd->setIcon(QIcon("English_en/addition.png"));
    5. QAction *actSub = new QAction(pOperationMenu);
    6. actSub->setIcon(QIcon("English_en/subtraction.png"));
    7. QAction *actMul = new QAction(pOperationMenu);
    8. actMul->setIcon(QIcon("English_en/multiplication.png"));
    9. QAction *actDiv = new QAction(pOperationMenu);
    10. actDiv->setIcon(QIcon("English_en/division.png"));
    11. QAction *actSquare = new QAction(pOperationMenu);
    12. actSquare->setIcon(QIcon("English_en/square.png"));
    13. QAction *actRoot = new QAction(pOperationMenu);
    14. actRoot->setIcon(QIcon("English_en/root.png"));
    15.  
    16. pOperationMenu->addAction(actAdd);
    17. pOperationMenu->addAction(actSub);
    18. pOperationMenu->addAction(actMul);
    19. pOperationMenu->addAction(actDiv);
    20. pOperationMenu->addAction(actSquare);
    21. pOperationMenu->addAction(actRoot);
    22. pOperationMenu->setGeometry( pt.x(), pt.y() , 40, 200 );
    23. pOperationMenu->show();
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 31st December 2008 at 08:23. Reason: missing [code] tags
    Ashish Kumar Saryar

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

    Default Re: QAction Icon

    Please search the forums. There are threads that instruct using a custom style (preferably a proxy style) to adjust the menu icon size.
    J-P Nurmi

Similar Threads

  1. QMessageBox missing icon
    By zanth in forum Qt Programming
    Replies: 3
    Last Post: 8th July 2010, 22:20
  2. Having some QObject problems
    By Barvik in forum Qt Programming
    Replies: 7
    Last Post: 13th November 2008, 05:29
  3. Couple of questions: main window icon + toolbar icon
    By bpackard in forum Qt Programming
    Replies: 0
    Last Post: 20th March 2008, 20:03
  4. Mac application and the Dock Icon
    By sekelsenmat in forum Qt Programming
    Replies: 3
    Last Post: 26th September 2007, 11:23
  5. QAction Icon
    By hgedek in forum Newbie
    Replies: 1
    Last Post: 14th September 2007, 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
  •  
Qt is a trademark of The Qt Company.