Registration Notice

Due to increased spam, forum registration must be manually approved by a moderator! Please see this post for instructions.

*

Offline FuzzyJack

  • 12
    • View Profile
  • Nottingham - UK
High DPI Issue
« on: January 02, 2024, 02:21:57 AM »
I searched the forum and couldn't find anything specifically about this but when using a computer with a high DPI or resolution the OP-Config tool may not display properly as it fails to scale both the window and the fonts to handle the high resolution.

I downloaded the Windows installer version and got this on Windows 10 Professional running on Bootcamp on a MacBook Pro running at 2880 x 1800 pixels. (See attachment NoScaling.png).

I know Luke is aware of this issue because there is a fix sitting in the code waiting to be used and a comment about how he couldn't test it at the time due to still compiling on qt 5.4.   That change was made 8 years ago of course and the code isn't currently regularly updated.

But if anyone does stumble into this like I did getting Qt installed and working isn't too hard (although I have used Qt 5.15.2 at the moment as the release 6 of qt looks to be a more comprehensive upgrade and I haven't got the environment setup correctly just yet for it to compile with that).

A few quick notes on that:

  • There is a commercial version of Qt and an Open Source one.  Clearly this is open source so you need to use the online installer to install the open source one.  You will need to create a Qt account.
  • If you do try version 6 of Qt then the SerialPort library is now an extra you will have to add in the custom installation or later using the Maintenance Tool
  • The default user file in the current main repo isn't compatible with the newer versions of Qt so you get a warning when you open it.   The recommendation appears to be to delete the old *.user files and let it create a new one (there are some variable type changes from the old one)

I currently have OP-Config compiling and running on Qt Creator 12.0.1 with Qt 5.15.2 with a MinGQ 8.1.0 64 bit compiler.

I haven't tested the WinSparkle updater or tried to build an installer from this yet but may have a go.

I've forked the repo here with the High DPI change included (and WinSparkle updated to 0.8.1 because it complained when I was still using the old one) https://github.com/ChrisSwallowWL/OP-Config


CodeChange.PNG
High DPI Issue CodeChange.PNG
Views: 596
NotScaling.PNG
High DPI Issue NotScaling.PNG
Views: 189
WithScaling.PNG
High DPI Issue WithScaling.PNG
Views: 170

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: High DPI Issue
« Reply #1 on: January 02, 2024, 11:50:10 AM »
Hi Chris,

Congrats on the most epic first post of all time! Guess you decided to jump straight into the deep end.

Back in the day I actually had complied in 5.6 with High DPI as a test, but since I didn't have a display with resolution greater than 1080P, it wasn't a very useful test. From what you've shown, the High DPI setting does seem to work well.

What this test back then did show me however were a few challenges that would come with upgrading to 5.6. The biggest downside was that QT Assistant (the program that renders all the built-in help files), was no longer supported, and at the time there wasn't a clear replacement. You can see a note to this effect in your first screen shot. It seemed a shame to lose the help, and most people were probably not using high resolution displays (well, that would have been more true in the past than today), so I stuck with 5.4. There were some other annoying bugs with 5.6, however I have heard they were fixed in later versions which did not exist back then.

Obviously if we're up to 5.15 now (not to mention 6.x), then a lot has changed in the intervening years, and maybe it is possible to get OP Config fully functional with a newer version. Having the high resolution issue resolved is a big advantage, but thorough testing needs to be done to make sure all the other components work.

If you want to keep experimenting please keep me posted on your progress and I'll be happy to help as I can!


Luke
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline FuzzyJack

  • 12
    • View Profile
  • Nottingham - UK
Re: High DPI Issue
« Reply #2 on: January 02, 2024, 02:48:53 PM »
I did see a comment about the Qt assistant and I think I did get an error about it myself when I tried something.

Happy to have a nosey when I get a mo.   I am primarily a Mac user myself normally but have this Windows machine for various reasons so I can try things on both.  Obviously there are already known issues with a Mac because it uses WinSparkle for the updates rather than sparkle and the code isn’t currently set up to work differently depending on the O/S.

There are a couple of compilation warnings already popping up on the Mac when trying to build and there was an issue running Qt at all on Mac OS X 14 Sonoma but there was a known fix for that.

I’m looking at using the software to run an Arduino with an external motor controller (actually a Raspberry Pi Hat version so should be useable from Arduino or Pi with Judicious use of headers/connectors and a bit of PCB).   The fun bit is getting the extra external components on a PCB with a suitable power supply rail to allow the current without being supplied by the Arduino or the Pi or too much wiring.

I would love to build a board specifically or the Heclo hat but I’m starting with a few separate components at the moment just to get my head round it a bit.   The only downside of the Heclo board I can see at the moment is the use of the jst/xh connectors for some of the lighting while the Henglong 7.0 uses DuPont connectors for those.  It would be really nice to have a straight swap for the Henglong boards without extra converters or connectors but I get that the TCB is designed to be more than just a replacement for one specific solution!

*

Offline FuzzyJack

  • 12
    • View Profile
  • Nottingham - UK
Re: High DPI Issue
« Reply #3 on: January 02, 2024, 02:55:20 PM »
Oh and I would be happy to recommend changes on a pull request from the fork if helpful.

One of the main differences in the later version is the settings in the user file but of course that contains user specific environment variables/paths and aren’t great for inclusion in the source control as it isn’t transferable between different environments.  Might have a think about that too.   

Not a Qt user before so it’s an interesting journey so far.   ;)

*

Offline LukeZ

  • 1241
    • View Profile
  • France
Re: High DPI Issue
« Reply #4 on: January 15, 2024, 02:45:01 PM »
Hi Chris, again apologies for having missed your posts. I've realized that I'm having problems getting forum notifications so I need to check in much more often.

I must admit to knowing absolutely nothing about Macs, having never so much as touched one in my life (a deliberate choice). I really have no idea what would be involved in compiling for Mac, but maybe for someone comfortable with that OS and a bit of programming experience it might be less difficult than I imagine. It awaits someone to try, but be careful also, because once you create something you then have to maintain, update, and support it for life, which we don't always think about at the beginning!


Oh and I would be happy to recommend changes on a pull request from the fork if helpful.   

With regards to the Windows version, yes do feel free to recommend changes using pull requests, though we can also discuss here in advance. The main update to OP Config that would be nice is exactly what you've identified, the issue with High DPI screens. That appears to be an easy fix as you've discovered, but fixing all the things that the fix breaks may prove more tedious. However again I would welcome with gratitude any improvements others want to devote themselve to, and will try to help as I can.


One of the main differences in the later version is the settings in the user file but of course that contains user specific environment variables/paths and aren’t great for inclusion in the source control as it isn’t transferable between different environments.  Might have a think about that too.
I may not know what this file is if it's specific to later versions of Qt, but even in my version there is an OpenPanzerConfig.pro.user file which I believe is the equivalent of what you're talking about, and yes, it's not of much use to share it. I think it could probably be left out and theoretically the environment would create it for whoever is compiling the source.


I would love to build a board specifically or the Heclo hat but I’m starting with a few separate components at the moment just to get my head round it a bit.
That is definitely the right approach to take! The result of your experiments with individual sections will go a long way to informing what kind of board you will ultimately want. Starting with a grand unified design at the beginning will always result in a lot of revision later on, or anyway that's my experience.

NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

 

bomber-explosion