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 to display full text in context menu for QHeaderView?

How to display full text in context menu for QHeaderView?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 355 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.
  • jronaldJ Offline
    jronaldJ Offline
    jronald
    wrote on last edited by
    #1

    Env

    Linux x86-64
    Qt 6.2.0

    Problem

    The code below works as expected except when it is in on_MyTreeViewHeader_customContextMenuRequested

    QMenu * menu = new QMenu(this);
    // add some menu entries
    menu->popup(screen_pos);
    

    context_menu.png

    The 2nd menu entry is "Delete Fin Period", but it is shortened, and in other cases (e.g. on_MyTreeView_customContextMenuRequested) longer menu entries display in full text.

    Question

    Why is it shortened?
    How to display full text in context menu for QHeaderView?

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

      Hi,

      IIRC, there's currently a bug in the menu rendering in Qt 6. Did you try with 6.2.1 just in case it was fixed in between ?

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

      jronaldJ 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi,

        IIRC, there's currently a bug in the menu rendering in Qt 6. Did you try with 6.2.1 just in case it was fixed in between ?

        jronaldJ Offline
        jronaldJ Offline
        jronald
        wrote on last edited by jronald
        #3

        @SGaist said in How to display full text in context menu for QHeaderView?:

        Did you try with 6.2.1 just in case it was fixed in between ?

        Not yet, it's not a problem for developing, I'll try it when Qt is upgraded in the official repo of Linux. If it still happens, I'll repost it, mark this post as solved now.

        Thanks

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          IIRC, there's currently a bug in the menu rendering in Qt 6. Did you try with 6.2.1 just in case it was fixed in between ?

          jronaldJ Offline
          jronaldJ Offline
          jronald
          wrote on last edited by
          #4

          @SGaist said in How to display full text in context menu for QHeaderView?:

          Did you try with 6.2.1 just in case it was fixed in between ?

          Tried Qt 6.2.1, the problem still exists.

          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