y.shan
17th September 2007, 16:15
Hi all!
I hope this wasn't discussed before, as I haven't found any related posts...
so my problem is that, i want to make a submenu, where i can list all my currently active mdi windows like in the microsoft office programs, where you can switch between the documents.
in qt 3, that wasn't a problem since there was a insertItem function, which didn't need a QAction.
in qt 4 you are only able to add a menu entry via a QAction, which is quite disturbing me.
i have already looked at the recent files example, which is similar to my problem with the difference, that in this example you assume that there is a maximum count of available entries. (you defined a enum { MAX_RECENTFILES = 9} for example and then defined QAction *recentFiles[MAX_RECENTFILES] in your header file to get the QActions, which I can't do since in the header file I don't know how many active windows there are gonna be)
BTW: I'm quite new, so chance is high that i missed a very easy way of doing this.
I hope this wasn't discussed before, as I haven't found any related posts...
so my problem is that, i want to make a submenu, where i can list all my currently active mdi windows like in the microsoft office programs, where you can switch between the documents.
in qt 3, that wasn't a problem since there was a insertItem function, which didn't need a QAction.
in qt 4 you are only able to add a menu entry via a QAction, which is quite disturbing me.
i have already looked at the recent files example, which is similar to my problem with the difference, that in this example you assume that there is a maximum count of available entries. (you defined a enum { MAX_RECENTFILES = 9} for example and then defined QAction *recentFiles[MAX_RECENTFILES] in your header file to get the QActions, which I can't do since in the header file I don't know how many active windows there are gonna be)
BTW: I'm quite new, so chance is high that i missed a very easy way of doing this.