Seite 1 von 1

QToolbar

Verfasst: 30. Mai 2006 10:09
von gyrosundmaronen
Moin

Hab meine Klasse von QMainWindow abgeleitet und hab mir ein Toolbar mit einem Actionbutton gebaut. Aber irgendwie zeigt meine GUI überhaupt nichts an, was für mich unverständlich ist.

Hier mal mein Code:

Code: Alles auswählen

 _fileTools	= new QToolBar( this , "Icon Tool-Bar" );
 _loadToolButton = new QToolButton( loadIcon, "load files", QString::null, 
	this, SLOT(load()), _fileTools, "load files" );
 _fileOpenAction = new QAction(
                "New Chart", QPixmap( loadIcon ),
                "&New", CTRL+Key_O, this, "new" );
                _fileOpenAction->addTo( _fileTools );
	_fileTools->addSeparator();
connect( _fileOpenAction, SIGNAL( activated() ), this, SLOT( load() ) );
loadIcon ist mein Icon was auf der Symbolleiste platziert werden soll.
Er zeigt weder die Symbolleiste noch den Button an.
Verdammte ...
Danke für die Hilfe.

MFG gyros

Verfasst: 30. Mai 2006 13:05
von gyrosundmaronen
Mein Programm ist ähnlich wie Excel aufgebaut. Und wollte mir zur besseren Übersicht Icons unter das Menü einbinden. Stehe noch ziemlich am Anfang von QT.

MFG gyros

Verfasst: 9. Juni 2006 15:06
von gyrosundmaronen
Nicht so viele auf einmal. Kann gar nicht so schnell Antworten!!!
Na, ja. Hab das Problem mitlerweile selber gelöst.

Trotzdem SCHÖNES SONNIGES WOCHENENDE