Yes I've made sure. And I also used the designer to build the subwindows and in the designer I've put a specific icon that is shown in the preview of the form but then when inserted that window in the mdiarea the icon becames replaced by the icon of the application,
I even issue the setWindowIcon with a nonexistent icon, as in that case no icon would be used, but always the same result the icon is the icon of the application.
regards,
Yes I've made sure. And I also used the designer to build the subwindows and in the designer I've put a specific icon that is shown in the preview of the form but then when inserted that window in the mdiarea the icon becames replaced by the icon of the application,
I even issue the setWindowIcon with a nonexistent icon, as in that case no icon would be used, but always the same result the icon is the icon of the application.
regards,
Yes I've made sure. And I also used the designer to build the subwindows and in the designer I've put a specific icon that is shown in the preview of the form but then when inserted that window in the mdiarea the icon becames replaced by the icon of the application,
I even issue the setWindowIcon with a nonexistent icon, as in that case no icon would be used, but always the same result the icon is the icon of the application.
regards,
Added after 1 45 minutes:
this
->setWindowIcon
(QIcon(QString::fromUtf8(":/Icons/Icons/insert-table2.png")));
tablewindow *windowtable=new tablewindow;
//windowtable->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/Icons/insert-table2.png")));
windowtable->setWindowTitle(dialog.fileName);
ui->mdiArea->addSubWindow(windowtable,Qt::SubWindow);
this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/Icons/insert-table2.png")));
tablewindow *windowtable=new tablewindow;
//windowtable->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/Icons/insert-table2.png")));
windowtable->setWindowTitle(dialog.fileName);
ui->mdiArea->addSubWindow(windowtable,Qt::SubWindow);
To copy to clipboard, switch view to plain text mode
Just to make more clear the above piece of code is in my mainwindow.cpp. when I added the first line of code
this
->setWindowIcon
(QIcon(QString::fromUtf8(":/Icons/Icons/insert-table2.png")));
this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/Icons/insert-table2.png")));
To copy to clipboard, switch view to plain text mode
the Icon of the main application changed as the icon of the subwindow (windowtable)
just to confirm that really insert-table2.png was acessible.
The behavior that I was expecting was to change only the subwindow icon through the line
//windowtable->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/Icons/insert-table2.png")));
//windowtable->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/Icons/insert-table2.png")));
To copy to clipboard, switch view to plain text mode
commented above but was not comented when I tested. I imagine that this is something deep inside qt that makes all the Qmainwindows share the icon of the main Qmainwindows. I may be wrong, obviously.
regards,
Bookmarks