Results 1 to 3 of 3

Thread: How to change the size of icon on qmainwindow?

  1. #1
    Join Date
    Jul 2015
    Posts
    26
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default How to change the size of icon on qmainwindow?

    the icon size is too small. How to make it bigger. It should be easy.
    After I tried a few things, nothing works.
    Why not to make this change straightforward in Qt?

  2. #2
    Join Date
    Jul 2015
    Posts
    26
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to change the size of icon on qmainwindow?

    1. setIconSize(). Not working
    2. resize png image does not work
    3. subclass QWindowsStyle with reimplementation of pixelMetric(). this function is called. But the change does not work.
    4. QStylesheet has not icon-size setting for qmainwindow
    Last edited by newcfd; 20th October 2015 at 03:14.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to change the size of icon on qmainwindow?

    Since it is not clear what you mean with "icon on qmainwindow", I guess you mean the icon displayed in the window decoration.

    That depends a lot on the platform.
    A platform where the window decoration is provided by the windowing system is doing what the windowing system wants to do.
    On a platform where that is not the case, the Qt platform adapter should be using the size that this commonly used on that platform.

    In either case it is not something that the application controls.

    Cheers,
    _

Similar Threads

  1. How to change the icon size in QMenu?
    By harinlen in forum Qt Programming
    Replies: 10
    Last Post: 19th June 2013, 04:21
  2. Replies: 5
    Last Post: 28th June 2011, 11:41
  3. How to change QMainWindow size at runtime?
    By myfifth in forum Newbie
    Replies: 11
    Last Post: 10th January 2011, 06:18
  4. How to change Icon size in QMenu?
    By alex chpenst in forum Qt Programming
    Replies: 4
    Last Post: 3rd September 2008, 14:16
  5. Difficult:Dynamic Icon size change?!?
    By nupul in forum Qt Programming
    Replies: 4
    Last Post: 10th April 2006, 09:39

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.