QTooltip max-width property



  • As currently implemented the QTooltip component has a max-height property but no max-width property. A popup with a long string can be the full page width.

    I’d very much like:

    (1) a QTooltip max-width property

    or

    (2) a default maximum width, ala

    el.style.maxHeight = maxHeight || ‘65vw’

    in …utils/popup.js.

    (3) a workaround?

    Thanks.


  • Admin

    The tooltip takes the shape of its content. So why not putting your QTooltip content inside a <div> which has max-width CSS prop set?

    <q-tooltip ...>
      <div style="max-width: 100px">
         ...tooltip content
      </div>
    </q-tooltip>
    


  • @rstoenescu - I had tried this with ‘%’ to no effect. Works as expected with ‘px’.


  • Admin

    “%” has no meaning there. Percentage of what? 🙂 Either use “vw” or a fixed size in px, em, rem, …