PDA

View Full Version : Problem with main window



M.A.M
1st June 2008, 14:58
Hello every one ..

I am a beginner for qt3 .

I have a problem and I hope to help me.

I used in my application main window , and as you know , main window has a menu

I want to change names of items in menu , like file , edit and so on to any specific

name , BUT in Arabic language . I tried to change names of items to Arabic names

but error appers to me :


.ui/ocr.h:62: error: declaration of ‘QPopupMenu* OCR::unnamed’
.ui/ocr.h:61: error: conflicts with previous declaration ‘QPopupMenu* OCR::unnamed’


when I searched for a sloution , I found that I could change names from file of user

interface , that is , file of extension .ui

BUT when I changed it , after first run , every thing is OK . but when I did another

run , the error appeared again :(:(:(

I really want your help

thanks in advance

rajeshs
2nd June 2008, 07:23
Can you please show your .ui file?

M.A.M
2nd June 2008, 13:55
Here is a peice of my ui code which have a menu :

I changed name of one of items in menu to specific name in Arabic



<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Form1</class>
<widget class="QMainWindow">
<property name="name">
<cstring>Form1</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>480</height>
</rect>
</property>
<property name="caption">
<string>Form1</string>
</property>
</widget>
<menubar>
<property name="name">
<cstring>MenuBar</cstring>
</property>
<item text="""&#34;ملف" name="unnamed">
<action name="fileNewAction"/>
<action name="fileOpenAction"/>
<action name="fileSaveAction"/>
<action name="fileSaveAsAction"/>
<separator/>
<action name="filePrintAction"/>
<separator/>
<action name="fileExitAction"/>
</item>
<item text="&amp;Edit" name="editMenu">
<action name="editUndoAction"/>
<action name="editRedoAction"/>
<separator/>
<action name="editCutAction"/>
<action name="editCopyAction"/>
<action name="editPasteAction"/>
<separator/>
<action name="editFindAction"/>
</item>
<item text="&amp;Help" name="helpMenu">
<action name="helpContentsAction"/>
<action name="helpIndexAction"/>
<separator/>
<action name="helpAboutAction"/>
</item>
</menubar>
<