Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.6.1
-
None
Description
Microsoft Teams has recently introduced the possibility to open any file with "Open in App".
When you open a file that is associated with a QT application, the QT application apparently get a wrong screen size and look small. The problem is particular evident with HDPI monitors.
The "Open a file in a desktop app" in teams and onedrive was a very requested functionality.
It is very new. Here I found some explanation on how it work:
https://www.linkedin.com/posts/reniereggink_onedrive-microsoft365-sharepoint-activity-7138094275400994816-v8zI
Once you do it copy the file locally with onedrive and the starts the registered application with the argument of the file copy on the local system. I was not able to find information from Microsoft.
It happens with our application and also with Qt Creator.
I added here a file "mainwindow.ui" you can add in microsoft teams.
The file contains reference to the documentviewer.qrc so you get a warning that the file does not exists that you should ignore.
Here is QT creator started from opening a file in File explorer (open file).
Here is QT creator opened on the same computer opening from Microsoft Teams with Open in App.
On the same computer the application started from MS-Teams report screen size of 539x303.
The actual screen size is 3840x2160 with scale of 250%
Here is the code used
QScreen *screen = QGuiApplication::primaryScreen();
s1->addInfo("Size x", screen->size().width());
s1->addInfo("Size y", screen->size().height());
s1->addInfo("Logical dpi x", screen->logicalDotsPerInchX());
s1->addInfo("Logical dpi y", screen->logicalDotsPerInchY());
s1->addInfo("Phisical dpi x", screen->physicalDotsPerInchX());
s1->addInfo("Phisical dpi y", screen->physicalDotsPerInchY());
Here the result when started from MS Teams
Here the result when the application started from File Explorer we get this sizes.
The app launched from file explorer and the one from microsoft teams are always the same.
So I have no idea why this happen.
I have tried to open file that use other desktop applications (like image editing) and they work as usual.
It may be a problem of Microsoft Windows of Microsoft Teams, but due to the fact that it affect QT Creator and apparently all QT Application I do report here.
I did a brief check of QT bug related issues an found something, but not sure they really relate to the same problem.
https://bugreports.qt.io/browse/QTBUG-110823
https://bugreports.qt.io/browse/QTBUG-104074
I did not investigate further due to the need to register the application on windows to open a specific file. I hope that the information is sufficient to frame the problem.