Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Change Qt menu bar height using QStyle / QProxyStyle?

Change Qt menu bar height using QStyle / QProxyStyle?

Scheduled Pinned Locked Moved General and Desktop
qstyleqproxystyleqmenubar
1 Posts 1 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jbrockerville
    wrote on last edited by
    #1

    I'm trying to use QProxyStyle to dynamically tweak my style. I have successfully changed the toolbar icon size by overriding pixelMetric() and using QStyle::PM_ToolBarIconSize, but I can't seem to find the right enum and possible function to override to change the menu bar height. How do I do this?

    It can be done by setting the style sheet using something like:

    QApplication::setStyleSheet( "QMenuBar::item { spacing: 0px; padding: 3px 6px 3px 8px; }" );

    But, for cleanliness and simplicity, I would like to keep my style tweaks contained to a single methodology.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved