QToolTip



  • HOw come the ToolTip isn't working?

    @
    actionNew->setToolTip(tr("Create a new File."));
    @

    That's what I tried, but there's no Tooltip, =(.

    I have
    @
    actionNew = new QAction(tr("&New;"), this);
    actionNew->setToolTip(tr("Create a new file."));
    @

    I also tried showToolTip, Qt has no function for showToolTip..

    Why is it always me that has issues with something this simple, I mean come on now, LOL.. =/.

    [EDIT: code formatting, please use @-tags, Volker]



  • Where do you put this action?
    It's not enough code to get the idea why tooltip is not popping.

    But maybe...
    [quote]
    Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute Qt::WA_AlwaysShowToolTips on the window, not on the widget with the tooltip.
    [/quote]



  • It's a known problem/feature. For a workaround see:
    http://developer.qt.nokia.com/forums/viewthread/6978



  • [quote author="chernetsov0" date="1312173033"]Where do you put this action?
    It's not enough code to get the idea why tooltip is not popping.

    But maybe...
    [quote]
    Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute Qt::WA_AlwaysShowToolTips on the window, not on the widget with the tooltip.
    [/quote]

    [/quote]

    Oh, thanks, =). So, Qt::WA_AlwaysShowToolTip; ?? Yeah, I am not sure, I think I need something before The Qt part, oh well, thanks for he help, =).



  • [quote author="chernetsov0" date="1312173033"]Where do you put this action?
    It's not enough code to get the idea why tooltip is not popping.

    But maybe...
    [quote]
    Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute Qt::WA_AlwaysShowToolTips on the window, not on the widget with the tooltip.
    [/quote]

    [/quote]

    Sorry, tried setAttribute(Qt::WA_AlwaysShowToolTips); didn't work, and as for window, what do you mean? I normally just have to use set, with no window name, if anything, it'd be AdvancedTextEditor..


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.