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. QToolButton with icon + text (below) and InstantPopup = looks bad
Forum Updated to NodeBB v4.3 + New Features

QToolButton with icon + text (below) and InstantPopup = looks bad

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.0k 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.
  • H Offline
    H Offline
    HornetMaX
    wrote on last edited by
    #1

    Hi all,
    I have a QToolBar on which I put some QToolButtons.
    They are displayer as Icon + text (Qt::ToolButtonTextUnderIcon) and have popup mode QToolButton::InstantPopup.

    The problem is, the small triangle that indicates the presence of the popup overlaps with the text.

    !http://i.imgur.com/bztWx4B.png()!

    I have to add a trailing space char to the strings to avoid that.

    Qt 5.3 & 5.4, Win 7 x64.

    MaX.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      roseicollis
      wrote on last edited by
      #2

      Hi, If you don't want that triangle to appear, call InstantPopup instead of MenuButtonPopup : )

      " Documentation":http://qt-project.org/doc/qt-4.8/qtoolbutton.html#ToolButtonPopupMode-enum

      1 Reply Last reply
      0
      • H Offline
        H Offline
        HornetMaX
        wrote on last edited by
        #3

        No, I'm using InstantPopup. If I use MenuButtonPopup I have a different "triangle" button and its position is not a problem.

        The positioning problem seems to be there only with InstantPopup.

        I was actually surprised to get the "triangle" with InstantPopup, but it makes sense as an indicator that clicking on the button (not necessarily on the triangle) will create a popup. It's just the layout that is strange.

        MaX.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          roseicollis
          wrote on last edited by
          #4

          And did you tried with void setArrowType ( Qt::ArrowType type ) and pas it Qt::NoArrow ??

          1 Reply Last reply
          0
          • H Offline
            H Offline
            HornetMaX
            wrote on last edited by
            #5

            setArrowType does something totally different (it displays an arrow instead of the icon).

            MaX.

            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