I have a program I designed for Desktop Applications for Windows with Qt MinGW 5.7. I was curious to see if it would work on a Surface tablet with Win10.
It does work, except for a small detail: eveything is offset. For instance, I grab the screen width with
"GetSystemMetrics(SM_CXSCREEN)" and I use this to place my window in the center of the screen. This works well on WinXp to Win10. However on a Surface tablet with Win10, everything is offset.
If I place an object at (0,0) it's fine but if I place it at (10,0), it will appear at (20,0).
What can I do ?
Thank you so much,
Alex
For the offset problem, I think it has to do with High-DPI scaling: http://doc.qt.io/qt-5/highdpi.html
But i'm not sure what to do to do it right.
Thanks,
Alex
Related
I am working on a existing Qt application and trying to support it on 4K monitor. For scaling the app, I am using "QT_SCREEN_SCALE_FACTOR" and scaling fonts based on logical DPI of screen. Everything is fine till this. Fonts for ribbon, docked windows are ok after scaling. But the font is getting too bigger for floating forms (pop up dialogs) and the docked widgets after undocking (the moment window is undocked, font is becoming bigger). I don't understand why this is happening. Is windows taking control over floating forms and making font bigger? Or am I missing something?
I am not using "Qt::AA_EnableHighDpiScaling" or "QT_SCALE_FACTOR" because I did not find these useful for me.
Has anyone faced this kind of problem?
Please let me know if someone knows about this.
After trying this and that, I found a solution to this problem.
I added'QGuiApplication::setAttribute(Qt::AA_DisableHighDpiScaling);' before creating QApp. And then I just needed to change the font size.
I'm working on an application, that's going to be running on an embedded device, but I'm having problems, as the screen on the said device is mounted upside-down.
I found that I could do the rotate="180" in the FXML, but the thing is that drop down doesn't change and is still rotated.
Any idea how I should rotate the screen?
PS. Underlying OS is Linux, but it's not running any X servers, so I can't really rotate it OS wise.
PPS. Even when I do rotate it using xrandr, the framebuffer freaks out and doesn't render full frames, so I get the "old WinXP frozen app drawing" ability.
Since we upgraded from aframe 0.8 to 0.9 we have a weird rendering behaviour when we enter vr mode on mobile device (i.e Samsung Galaxy S8)
You can see this white space in the middle on both eyes which is simply "not rendered" I guess. The hall is a .obj model with a .mtl provided (yes, I know glTF would be better but unfortunately it is not in our hands).
We tested on all mobile browsers with the same result. On Desktop Version everything works fine. Can someone verify / explain this?
It's quite embarrassing, but we found the solution.
Our external model designer designed every floor tile as a single object... Now we use a floor where all the tiles are one single object and that seems to work well.
A while back, when we were first testing our app, the screen used to rotate when we tilted the phone. Even if the portrait formatting wasn't so great, it still responded to the orientation change.
I have no idea what happened between that point and this, but it no longer responds to orientation changes, at all. If I tilt the phone, it stays in portrait mode and does not rotate at all, the text does not align to the new orientation.
This is across all platforms, and I have the proper settings selected for each specific platform (in iOS in the info.plist, and in Android with the MainActivity decorations.)
The one thing I did do is that moved all of my screens from StackLayout-based to FlexLayout-based. But the screen SHOULD still rotate, or at least ATTEMPT to rotate, should it not? And this happens across all screens.
So ... if I may please could get some advice about what may be happening, here, that causes this behavior across all platforms?
It should be noted that we are also using Telerik libraries for many of our controls (but I don't know why it would make a difference.)
Also, it's a shared app.
Issue solved. Rotation was locked.
I was given a new laptop at work and when I switch back and forth from a docking station, RStudio seems to have problems realizing the change in display, while all the other programs seem to auto-detect and re-zoom appropriately. The only fixes I've found is logging out and back into my Windows user account, or going through R-Studio's View>Zoom-in or View>Zoom-out when going back and forth between docked and undocked, which takes time.
There's not some setting I'm missing, is there, so RStudio detects the type of display and auto-adjusts? Example images below.
thank you, dave
This is a known issue, and there is some indication that there are plans to address this in rstudio v1.2.
https://community.rstudio.com/t/dramatic-screen-resolution-issue-see-screen-snip/3703/6
A workaround suggested here:
You should be able to work around this by toggling the Zoom level in the Appearances pane
RStudio is basically a browser window (chrome web application). It will render according to the resolution of the screen, at the current zoom setting. It will not change your zoom level as you switch monitors. Ctr- and Ctrl+ are shortcuts for zooming in and out, where you should also see a popup with a reset (to 100%) option.
Zooming is not the same as changing font sizes, which is the preferable way of ensuring a good visual experience for a resolution.