If I create a UI file for a main window with a toolbar in Qt Designer 4, and then create a Ruby file using rbuic4, there
is apparently an error in the setupUi method which results in the toolbar being displayed in a wrong place. The setupUi
method calls addToolBar(0, @toolBar), where 0 = Qt::NoToolBarArea, and it should probably use Qt::TopToolBarArea instead
of 0.
Steps to reproduce:
1. Start Qt Designer 4.
2. Create a new "Main Window" UI.
3. Right-click inside the window and "Add Tool Bar".
4. Click on the "Type here" in the menu bar and create one menu.
5. Save the UI.
6. Generate Ruby source using rbuic4 with -x.
7. Call the generated script.
8. Results:
- message in the console: "QMainWindow::addToolBar: invalid 'area' argument"
- the tool bar is overlapping the menu bar
(software versions: QtRuby 1.4.9, Qt 4.3.2, Ruby 1.8.2; OS: Kubuntu Linux 7.10)
|