Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Add spacing to QMenu::item without resizing QMenu::right-arrow
QtWS25 Last Chance

Add spacing to QMenu::item without resizing QMenu::right-arrow

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qssqmenuembedded linux
4 Posts 2 Posters 1.0k 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.
  • A Offline
    A Offline
    Aramir
    wrote on 3 Feb 2022, 13:28 last edited by
    #1

    Hello,
    Why does the QMenu::right-arrow size change when I'm tweaking QMenu::item size (throught padding,margin,spacing, etc).

    How can I prevent this or change QMenu::right-arrow size (preferably without replacing the stock image) ?

    e606218f-b021-4d41-a76f-f106f98b5aaa-image.png

    1 Reply Last reply
    0
  • S Offline
    S Offline
    SGaist Lifetime Qt Champion
    wrote on 3 Feb 2022, 19:57 last edited by
    #2

    Hi,

    How are you doing that ?
    Which version of Qt are you using ?
    On which platform ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    A 1 Reply Last reply 3 Feb 2022, 20:51
    0
  • A Offline
    A Offline
    Aramir
    replied to SGaist on 3 Feb 2022, 20:51 last edited by Aramir 2 Mar 2022, 21:21
    #3

    @SGaist

    • How are you doing that ?

    Hello I'm simply using the following stylesheet :

            "QMenuBar { spacing : 20px; }"
            "QMenuBar::item { padding-top : 15px; padding-bottom : 5px; color: black; }"
            "QMenuBar::item#statusBar { background : transparent; }"
    
            "QMenu::item { padding : 10px }"
            "QMenu::separator { height : 2px ; background : darkgray }"
    

    link to those lines within my project (branch vocab) https://git.hijackedbrain.com/hijackedbrain/Obenkyobo/src/commit/8621fc8e2cf1ffc6eda4cefef34420b4e0746a20/Src/mainwindow.cpp#L37

    The QMenu itself is made using qtdesigner
    bfad8d90-c681-41a6-bd9c-abb528c4e002-image.png

    • Which version of Qt are you using ? On which platform ?

    I'm using qt-linux-5.15-kde-kobo for kobo ereaders (linux arm devices). Compiled using the following scripts :
    https://github.com/Rain92/kobo-qt-setup-scripts
    https://github.com/Rain92/qt5-kobo-platform-plugin

    The project itself should compile and work fine (enough) on pc but does not look the same at all.
    Unusual use case I know :/.

    Running on a Libra H2O in the screenshots.

    1 Reply Last reply
    0
  • S Offline
    S Offline
    SGaist Lifetime Qt Champion
    wrote on 4 Feb 2022, 19:27 last edited by
    #4

    It's likely something that is highly specific to your device.
    What is it running to manage its GUI ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0

3/4

3 Feb 2022, 20:51

topic:navigator.unread, 1
  • Login

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