ich möchte mir eine QAction erstellen:
Code: Alles auswählen
QAction ( const QIcon & icon, const QString & text, QObject * parent ) // laut Hilfe
openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this); // ist ein Bsp aus der Hilfe
Also so:
Code: Alles auswählen
const QString Text = "Das soll in die open Action";
openAct = new QAction(QIcon(":/images/open.png"), &Text.data() , this); // so funktionierts nicht....
Mit "Text.date()" bekomme ich ja ein "const Qchar*" zurück Den möchte ich zu einem "const QString & text" casten ....Die Frage ist ich das soweit richtig sehe, ob es vlt auch einfacher geht und wenn das so gut ist wie ich es bisher vorhabe?
Danke soweit
mfg Cascoin
Danke schonmal....
mfg cascoin