Seite 1 von 1

Kein Tooltip mit QRubberBand

Verfasst: 9. März 2009 09:57
von nasahl
Hallo,

ich benutze ein QRubberBand das ich auf ein anderes Widget setze. Zum RubberBand hätte ich gerne einen Tooltip. Meine Implementierung dazu ist wie folgt:

Code: Alles auswählen

class MyRB : public QRubberBand
{
public:
    MyRB( QWidget* w, QRect r ) : QRubberBand(QRubberBand::Rectangle, w)
    {
        setGeometry(r);
        setToolTip( QObject::tr( "hallo" ));
        setAttribute(Qt::WA_AlwaysShowToolTips, true);
        show();
    }

private:
    MyRB();
};
es wird aber kein Tooltip angezeigt. Hat jemand eine Idee wieso?

Christof