[Qt-interest] setWindowModified() in QMdiSubWindow

Constantin Makshin cmakshin at gmail.com
Thu Apr 15 16:02:31 CEST 2010


Hi!

I have a QMainWindow with QMdiArea as the central widget. Each sub-window (my class derived from QMdiSubWindow) has "[*]" placeholder in its title to show the user when changes in the sub-window need to be saved. Sub-windows set their titles with setWindowTitle() because I want to use titles in somewhat specific format.

Both sub-window and main window titles are correct (the asterisk is shown when necessary and hidden otherwise), but items in the main window's "Window" menu (the one that lets the user select a sub-window) always show "raw" titles (with the placeholder).

Is there a more elegant way to solve this problem than manually removing the placeholder when a sub-window is not modified?

-- 
Constantin Makshin



More information about the Qt-interest-old mailing list