Skip to content
  • 0 Votes
    2 Posts
    146 Views
    A

    It seems that my custom tooltip gets used when doing ToolTip {} inside a control, but not when using the attached ToolTip properties. I guess it's just not implemented yet, regardless what the docs suggest? Has anyone successfully styled the attached ToolTip?

  • 0 Votes
    4 Posts
    1k Views
    SamurayHS

    I've decided to report this issue as a bug here.
    Was you able to reproduce the issue ?

  • 0 Votes
    16 Posts
    5k Views
    Gojir4G

    @milan Hi,
    You can do it using a delegate and a ToolTip component:

    import QtQuick.Controls 2.2 as QC2 ... TableViewColumn { id: titleColumn title: "Title" role: "title" movable: false resizable: false width: tableView.viewport.width - authorColumn.width delegate: QC2.ItemDelegate{ id: lb hoverEnabled: true text: model.title width: parent.width QC2.ToolTip { delay: 250 parent: lb visible: lb.hovered text: "Tooltip text" //put styleData.tooltip here } } }

    This code is extracted from the TableView example which I have modified to add the ToolTip.

  • 0 Votes
    6 Posts
    2k Views
    P

    I guess if there had been concern of a leak, that was apparently a false positive of a unit test. (I'm not sure about this detail).
    This has been resolved, as of today. Here is a summary:

    This bug originally appeared in Qt 5.0, was reported in Qt 5.3.0 (QTBUG-39147), and fixed for Qt 5.9.2 (on 7-19-2017). The removal of Qt_WS_* macros (replaced with Q_OS_* macros), and incomplete porting of the widgets/kerna/qtooltip.cpp module, caused the QTipLabel to be instantiated with the client widget as its parent widget. That had been a known problem on Windows which directly caused this dysfunction (Showing a tooltip raises the whole window).

    See "Patch Set 6" in this Qt code review page, and it's associated "gitweb" link, and the original bug report:

    https://codereview.qt-project.org/#/c/177376/ https://bugreports.qt.io/browse/QTBUG-39147
  • 0 Votes
    2 Posts
    809 Views
    VRoninV

    Just a guess here: did you try using a model (QStandardItemModel) to store the values and use Qt::ToolTipRole to store the tooltip you want to show and them use QVBarModelMapper to plot it?

  • 0 Votes
    3 Posts
    3k Views
    jpnurmiJ

    Hi, this ToolTip bug has been fixed in Qt 5.7.1, which should be released very soon.