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. Hide shorcut text of QMenu Action and more ;)
Forum Updated to NodeBB v4.3 + New Features

Hide shorcut text of QMenu Action and more ;)

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 3.5k Views 1 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.
  • K Offline
    K Offline
    KillGabio
    wrote on last edited by
    #1

    I ve looking for an answer all over the internet but i dont seem to get one...

    i ve tried changing the stylesheet but i think there's no option to do what i want

    in the documentation i ve read that the action has: (icon-text-shorcut text), so what i want is to disable/hide the shorcut text

    basically i want Ctrl+F to disappear from the menuAction for example :/

    The second question is...i want to only show windowTitle and windowIcon
    so far i have this
    @mainWin->setWindowFlags (Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);@

    but the icon doesnt appears..(i dont want the close/help/min/max buttons to appear)

    thanks!

    1 Reply Last reply
    0
    • B Offline
      B Offline
      broadpeak
      wrote on last edited by
      #2

      For your first question, this can helps:

      (QAction::) void setVisible ( bool )

      yourAction.setVisible (false);

      "This property holds whether the action can be seen (e.g. in menus and toolbars)."

      http://developer.qt.nokia.com/doc/qt-4.8/qaction.html#visible-prop

      Your second question is a hard thing...

      1 Reply Last reply
      0
      • B Offline
        B Offline
        broadpeak
        wrote on last edited by
        #3

        For your second question:

        No buttons in title bar:
        setWindowFlags(Qt::Tool | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);

        But this is platform DEpendent! (mac osx...)

        1 Reply Last reply
        0
        • K Offline
          K Offline
          KillGabio
          wrote on last edited by
          #4

          hi thank`s for your reply, but...

          i want the action to be visible in the menu, i just dont want the Ctrl+F thing to appear, i just need

          [icon][action text]

          for the seccond option, no icon was showed :(

          1 Reply Last reply
          0
          • K Offline
            K Offline
            KillGabio
            wrote on last edited by
            #5

            example: !http://www.qtcentre.org/attachment.php?attachmentid=7274&d=1326675286&thumb=1(ctrl+f OUT!)!

            1 Reply Last reply
            0
            • B Offline
              B Offline
              broadpeak
              wrote on last edited by
              #6

              1st.:

              findAction->setShortcut(tr("Ctrl+F"));

              I've seen now the doc about this, but i cannot see any solution :S


              2nd.:

              "platform DEpendent"

              What is your OS?

              1 Reply Last reply
              0
              • K Offline
                K Offline
                KillGabio
                wrote on last edited by
                #7

                Windows :/

                I ve read the documentation too, but i dont get any solution..i thought maybe with stylesheet of QMenu but i dont know... thanks for trying dude i really appreciate the help

                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