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. How QMenu text align center and adjust size ?
Forum Updated to NodeBB v4.3 + New Features

How QMenu text align center and adjust size ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.1k Views 2 Watching
  • 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.
  • sonichyS Offline
    sonichyS Offline
    sonichy
    wrote on last edited by sonichy
    #1

    It seems align left and too wide default.
    替代文字

    https://github.com/sonichy

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you explain a bit more we are looking at ?
      What OS are you running ?

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

      sonichyS 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Can you explain a bit more we are looking at ?
        What OS are you running ?

        sonichyS Offline
        sonichyS Offline
        sonichy
        wrote on last edited by
        #3

        @SGaist I am writing a dock app on Deepin Linux using KWindowSystem.

        https://github.com/sonichy

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Do you mean a plasma panel ?
          What tutorial are you following ?

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

          sonichyS 1 Reply Last reply
          1
          • SGaistS SGaist

            Do you mean a plasma panel ?
            What tutorial are you following ?

            sonichyS Offline
            sonichyS Offline
            sonichy
            wrote on last edited by
            #5

            @SGaist I learn from my net friend.
            https://github.com/pandaos/panda-dock
            https://github.com/sonichy/HTYDock_KWin

            https://github.com/sonichy

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              Hi
              Are you talking about
              alt text

              Anyway, QMenu dont have many options for how it draws so you must use
              a proxy style to change it.

              https://stackoverflow.com/questions/59218378/qmenu-right-align-text

              and for the size, i think you need to subclass QMenu and change sizeHint()

              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