Results 1 to 1 of 1

Thread: QMenu item icon size

  1. #1
    Join Date
    Nov 2013
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QMenu item icon size

    Hello,

    First of all, I would like to precise that I did go through the different solutions presented on this forum to change the sizes of the icons inside a style.

    Here is my problem:

    I am trying to style a QMenu using a QSS file, but I cannot find how to set the icon size.

    If I use a special style (as in http://www.qtcentre.org/threads/4173...r-resize-icons), my own style gets overriden and although the icon style is correct, everything else is wrongly displayed.

    Any ideas?
    - what is the CSS keyword to set the icon style?
    - if none such thing exists, is it possible to apply just a "portion" of a style?

    Addendum: if I do this:
    myObject->setStyle(myStyle);
    myObject->setObjectName("MyObject");
    myObject->setStyleSheet("#Dummy {border: none;}");

    It works and both the icon sizes are right, and my stylesheet is being used. Note that the "set style sheet" is absolutely doing nothing, but if not there, no styling.

    Thank you,

    Geraud
    Last edited by Geraud; 12th November 2013 at 23:28.

Similar Threads

  1. problem with QMenu::icon border
    By sattu in forum Qt Programming
    Replies: 1
    Last Post: 2nd July 2013, 15:27
  2. How to change the icon size in QMenu?
    By harinlen in forum Qt Programming
    Replies: 10
    Last Post: 19th June 2013, 05:21
  3. Style QMenu::item's icon
    By been_1990 in forum Qt Programming
    Replies: 2
    Last Post: 26th February 2013, 15:59
  4. Replies: 0
    Last Post: 27th April 2010, 16:15
  5. How to change Icon size in QMenu?
    By alex chpenst in forum Qt Programming
    Replies: 4
    Last Post: 3rd September 2008, 15:16

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.