PDA

View Full Version : addToolBar, but only once please



gboelter
20th September 2008, 06:38
Hello!

With Qt4, is there a way to make sure, that this toolBar



toolBarKunden = new QToolBar(this);
setObjectName(QString::fromUtf8("toolBarKunden"));
addToolBar(Qt::TopToolBarArea, toolBarKunden);
setWindowTitle(QApplication::translate("Erpel", "toolBarKunden", 0, QApplication::UnicodeUTF8));


will be created only once?

Something like



if (!toolBarKunden)
{
// createToolBar ...
}


Thanks in advance,

Guenther

jpn
22nd September 2008, 16:31
It's called C++. :) Did you remember to initialize the pointer?