Resizing MenuBar by stylesheet



  • Hello everyone,

    i'm trying to resize and set background image, to my menuBar, background image is ok, but when i try resize the
    menuBar, the items render out of the mainwindow(screen included).

    !http://idea.efine.cz/menubar.jpg(menubar error)!

    Is it possible resize the menu bar ? Or am i doing something wrong?
    @
    QMenuBar *myBar = menuBar();
    myBar->setObjectName("menuBar");
    myBar->addMenu(fileMenu);
    @
    @
    QMenuBar#menuBar {
    background: url(':/images/header.png') no-repeat;
    width: 1024px;
    height: 40px;
    }
    @

    thx for answers


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.