[SOLVED] QMenuBar problem
-
Hello,
I'm using a QTableView and i put a QMenuBar in the last column but when I insert a QMenu, it's not displayed. I must click on a kind of double-array in order to get menus while I would like a menu like in a QMainWindow i.e all menu were displayed horizontally.
-
Hi,
Please provide some code/images of your requirements so that we can understand what exactly is the problem. Are you using your own delegate or setIndexWidget(). -
I'm using the setIndexWidget() method and the cell displays a ">>" button in order to print the menu while I want the menu directly.
-
Ok.
Try this hope it solves what you need.@QMenu *menu = new QMenu(this);
menu->addMenu(" Austria");
menu->addMenu(" Dubai");yourButton->setMenu(menu);@
-
Thanks you very much, it's exactly what I was expecting !
-
You are welcome!!!!!