Seite 1 von 1

Anzeigefehler in QToolBar

Verfasst: 19. Februar 2010 12:43
von GrooveXT
Hallo,
ich implementiere gerade eine QToolBar und ich möchte gerne die Icons mit Text darunter anzeigen lassen. Jedoch wird jeweils die letzte Zeile des Text nicht richtig dargestellt. Besonders fällt dies beim Bchstaben "g" auf, dort wird der untere Bogen gänzlich abgeschnitten.

Mach ich was falsch, kann ich es umgehen oder ist das einfach nen Fehler in Qt?

System: Windows 7 Prof x64, Entwicklung mit Qt Creator 1.3 und mingw.

Quelltext:

Code: Alles auswählen

void MainWindow::createToolBar()
{
    diagramToolbar = new DiagramToolBar(this,dataDisplay->diagramWidget());
    diagramToolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);

    QToolBar *fileToolBar = new QToolBar(this);
    QAction *newAction = new QAction(QIcon("../resources/buttons/eView_newDataBase.ico"),"Neu",this);
    QAction *openAction = new QAction(QIcon("../resources/buttons/eView_loadDataBase.ico"),"Öffnen",this);
    QAction *saveasAction = new QAction(QIcon("../resources/buttons/eView_SaveDataBase.ico"),"Speichern",this);
    QAction *printAction = new QAction(QIcon("../resources/buttons/eView_Print.ico"),"Drucken",this);
    fileToolBar->addAction(newAction);
    fileToolBar->addAction(openAction);
    fileToolBar->addAction(saveasAction);
    fileToolBar->addAction(printAction);
    fileToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);

    QToolBar *databaseToolBar = new QToolBar(this);
    QAction *newContractAction = new QAction(QIcon("../resources/buttons/eView_newContract.ico"),"Neuer\nVertrag",this);
    QAction *editContract = new QAction(QIcon("../resources/buttons/eView_editContract.ico"),"Vertrag\nbearbeiten",this);
    QAction *deleteContract = new QAction(QIcon("../resources/buttons/eView_deleteContract.ico"),"Vertrag\nlöschen",this);
    QAction *contractProperties = new QAction(QIcon("../resources/buttons/eView_ContractProperties.ico"),"Vertrags-\neigenschaften",this);
    databaseToolBar->addAction(newContractAction);
    databaseToolBar->addAction(editContract);
    databaseToolBar->addAction(deleteContract);
    databaseToolBar->addAction(contractProperties);
    databaseToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);

    addToolBar(fileToolBar);
    addToolBar(databaseToolBar);
    addToolBar(diagramToolbar);
}
Danke für eure Hilfe.

PS: Ich habe schon ersucht die Iconsize zu ändern oder die Toolbarhöhe zu ändern. Aber nix hilft.