Re: [Interest] Qt5 and global configuration
On Thursday 13 November 2014 14:59:19 Thiago Macieira wrote: Which means that we should not use Qt5 apps on less supported desktop environments and we should not use Qt5 apps launched under another user with empty home folder? No, it means Qt 5 needs to support those desktops too, as much as possible. Note that all the Qt-based desktops should provide the theme plugin by themselves. That's true, but not all of them do, and obviously some of them are so unpopular that effort of supporting them in Qt may be not worth trying, which leaves the users of those desktops with Qt4 but not with Qt5. As for an empty $HOME, it means no desktop, so the Fusion style is just fine. Well, I'm not worried too much about the looks, I'm worried more about proper font sizes, as we're entering the age when 96dpi becomes less and less common. 2. Read 'dpi' config value from fontconfig. Disagreed. The DPI value comes from the windowing system, not from fontconfig. There are multiple issues with that. I'm talking about X right now: - when you're using some brand new laptop your physical screen dimension may not be present in X db yet, which means that X just takes your screen resolution, assumes 96dpi and calculates physical dimensions based on that, which usually gives you result very far from expected. Yes logical thing would be to report that as issue into X and wait until it will be added/resolved, then ported to your distribution, which in case of enterprise or just stable distributions will never happen. Fontconfig, on the other hand, does not have any defaults (or should not), which means that if you got the value from fontconfig - that value is configured by user, who usually knows better, and that value should override values reported by X. - when using Xinerama with largely different screens, like 13 laptop + 27 external monitor, again reported DPI is very far away from both of those devices, in which case user has to experiment which value will result in more- or-less readable text on both devices. So I'm not suggestion to support only fontconfig, but allow fontconfig to override the values reported by windowing system. 3. Propose (or use if already exists) some XDG variable or something like that to determine if desktop is black-on-white or white-on-black, and add support for those 2 basic setups. You're proposing an XDG widget style/theme configuration. It's required, but it won't happen. Moreover, I don't think it can happen, since the style is more than the colours and font sizes. It's also about what the widgets look like and how they behave. Those aren't configuration files, they are *code*. It gets worse with Wayland because now applications need to draw the window decorations too. Unless ALL the toolkits have each a plugin for the same themes, the window decorations will look different. Yes, I understand the issue, and I understand that there is no really good way of solving that. But I think that some very simple mechanism would suffice, just to know if the desktop theme is black-on-white or white-on-black, and have 2 default Fusion styles based on that. Nothing fancy, just don't stand out too much. That's all that needed to make Qt5 look bearable on unconfigured/unsupported desktop. Unconfigured is out of scope. Unsupported is solved by making it supported. Well, unless pt and dpi size will be discovered somehow (from fontconfig?) then I agree, otherwise creating test user and launching Qt apps will be quite wasteful (because of need to configure some kind of desktop before being able to sudo something from that user), while with Qt4 it is possible to launch qtconfig and set proper font family. -- Regards, Stas ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Thursday 13 November 2014 20:12:46 René J.V. Bertin wrote: solve the majority of issues: ... fontconfig ... XDG That's all that needed to make Qt5 look bearable on unconfigured/unsupported desktop. There you go ... Linux is the new MS Windows? :) Fontconfig is present on OS X but I highly doubt it is used by Qt (if it's like freetype, it's linked in, for unclear reasons). XDG does not exist on OS X. I'd guess that neither are present on a typical MS Windows set-up. I cannot understand your point. You can suggest your solution what will be Mac-specific and will be a good compromise between configurability and not needing qtconfig, I do not have Qt apps on mac so I do not see any issues with them, I will not be able to help you with your arguments in this case. What I'm talking about is that Qt5 has configurability regression in comparison to Qt4, but I have no warm feeling for qtconfig, and if upstream developers do not want it - there should be another way to fix it, that will provide good compromise for both parties. -- Regards, Stas ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On 11/14/2014 02:41 PM, Stanislav Baiduzhyi wrote: - when you're using some brand new laptop your physical screen dimension may not be present in X db yet, which means that X just takes your screen resolution, assumes 96dpi and calculates physical dimensions based on that, which usually gives you result very far from expected. Every reasonably modern computer screen provides its physical size in EDID and X server will use that information unless you explicitly tell it to use other source. signature.asc Description: OpenPGP digital signature ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Friday 14 November 2014 15:10:05 Constantin Makshin wrote: On 11/14/2014 02:41 PM, Stanislav Baiduzhyi wrote: - when you're using some brand new laptop your physical screen dimension may not be present in X db yet, which means that X just takes your screen resolution, assumes 96dpi and calculates physical dimensions based on that, which usually gives you result very far from expected. Every reasonably modern computer screen provides its physical size in EDID and X server will use that information unless you explicitly tell it to use other source. And yet with every new laptop I'm getting I have to write it down manually to xorg.conf to make X return proper values :) and not only laptops, but my brand new Philips 3D monitor had to be forced as well. I agree with your points that stuff like that should not be needed in 21st century, but real world is way close to antiutopia than we would like, so forcing proper DPI resolution is one of major world problems at the moment. -- Regards, Stas ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
Probably lack of similar problems with my screens (both notebook and desktop) made me over-optimistic. :) On 11/14/2014 03:20 PM, Stanislav Baiduzhyi wrote: On Friday 14 November 2014 15:10:05 Constantin Makshin wrote: On 11/14/2014 02:41 PM, Stanislav Baiduzhyi wrote: - when you're using some brand new laptop your physical screen dimension may not be present in X db yet, which means that X just takes your screen resolution, assumes 96dpi and calculates physical dimensions based on that, which usually gives you result very far from expected. Every reasonably modern computer screen provides its physical size in EDID and X server will use that information unless you explicitly tell it to use other source. And yet with every new laptop I'm getting I have to write it down manually to xorg.conf to make X return proper values :) and not only laptops, but my brand new Philips 3D monitor had to be forced as well. I agree with your points that stuff like that should not be needed in 21st century, but real world is way close to antiutopia than we would like, so forcing proper DPI resolution is one of major world problems at the moment. signature.asc Description: OpenPGP digital signature ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Friday 14 November 2014 12:41:08 Stanislav Baiduzhyi wrote: 2. Read 'dpi' config value from fontconfig. Disagreed. The DPI value comes from the windowing system, not from fontconfig. There are multiple issues with that. I'm talking about X right now: [cut] All of those you listed are true, but you're asking for us to work around a structural problem in X (which we usually do). And in fact, we're already doing the necessary changes to support high DPI. I don't think the DPI is an issue that we need to discuss here. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Friday 14 November 2014 09:08:11 Thiago Macieira wrote: All of those you listed are true, but you're asking for us to work around a structural problem in X (which we usually do). And in fact, we're already doing the necessary changes to support high DPI. I don't think the DPI is an issue that we need to discuss here. But I'm not talking about HighDPI support, I'm talking about possibility to configure size of fonts on some corner cases. And font size for me consists of Pt size and DPI. Plus my main point is, thanx to qt-config in Qt4 it was possible to configure font sizes, even if DPI is not detected properly, tune Pt size that will not correspond to the typographical constant. And there is not such mechanism in Qt5, and I think that everyone will win if there will be one. -- Regards, Stas ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Wednesday 12 November 2014 12:46:02 Thiago Macieira wrote: 3) delegation: this is delegated to the platform theme plugins. Qt applications are meant to look like the system, therefore the the plugin will decide what the application should look like and which files it needs to read in order to come to the right decisions. We could provide a plugin that reads configuration files, but it would not be the default in any platform. That can be extremely problematic on desktops without any kind of UI or less supported UI. Think of TWM, IceWM, some rare desktops like now perished RazorQt and stuff like that. Or adding second user on your main system but not logging in for the first time to allow KDE or gnome to create any configuration, but just launching Qt apps with kdesu or sudo. In addition, all of that can go though vnc to the display with ppi resolution very far from one the app is launched on. In those cases having normal configurations hierarchy (like read app settings, fallback to ~/.config, fallback to /etc) would be extremely helpful. And that is one of the reasons why using Qt4 apps in all of those cases I listed above is way more convenient than using Qt5 apps. -- Regards, Stas ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Thursday 13 November 2014 10:19:40 Stanislav Baiduzhyi wrote: On Wednesday 12 November 2014 12:46:02 Thiago Macieira wrote: 3) delegation: this is delegated to the platform theme plugins. Qt applications are meant to look like the system, therefore the the plugin will decide what the application should look like and which files it needs to read in order to come to the right decisions. We could provide a plugin that reads configuration files, but it would not be the default in any platform. That can be extremely problematic on desktops without any kind of UI or less supported UI. Think of TWM, IceWM, some rare desktops like now perished RazorQt and stuff like that. Or adding second user on your main system but not logging in for the first time to allow KDE or gnome to create any configuration, but just launching Qt apps with kdesu or sudo. In addition, all of that can go though vnc to the display with ppi resolution very far from one the app is launched on. In those cases having normal configurations hierarchy (like read app settings, fallback to ~/.config, fallback to /etc) would be extremely helpful. And that is one of the reasons why using Qt4 apps in all of those cases I listed above is way more convenient than using Qt5 apps. Qt is not a desktop. I don't like the idea of qtconfig because it's not Qt's purpose to do that. It's the desktop's. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Thursday 13 November 2014 09:25:43 Thiago Macieira wrote: That can be extremely problematic on desktops without any kind of UI or less supported UI. Think of TWM, IceWM, some rare desktops like now perished RazorQt and stuff like that. Or adding second user on your main system but not logging in for the first time to allow KDE or gnome to create any configuration, but just launching Qt apps with kdesu or sudo. In addition, all of that can go though vnc to the display with ppi resolution very far from one the app is launched on. In those cases having normal configurations hierarchy (like read app settings, fallback to ~/.config, fallback to /etc) would be extremely helpful. And that is one of the reasons why using Qt4 apps in all of those cases I listed above is way more convenient than using Qt5 apps. Qt is not a desktop. I don't like the idea of qtconfig because it's not Qt's purpose to do that. It's the desktop's. Which means that we should not use Qt5 apps on less supported desktop environments and we should not use Qt5 apps launched under another user with empty home folder? Which effectively means that target audience of Qt5 is much smaller than target audience of Qt4? If there is no qtconfig and configuration files hierarchy, there should be another way of doing the same things. In my opinion, following list would solve the majority of issues: 1. Propose default font size in pt for fontconfig, and support that parameter in Qt. 2. Read 'dpi' config value from fontconfig. 3. Propose (or use if already exists) some XDG variable or something like that to determine if desktop is black-on-white or white-on-black, and add support for those 2 basic setups. That's all that needed to make Qt5 look bearable on unconfigured/unsupported desktop. -- Regards, Stas ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Thursday November 13 2014 18:52:45 Stanislav Baiduzhyi wrote: Qt is not a desktop. I don't like the idea of qtconfig because it's not Qt's purpose to do that. It's the desktop's. That's fine on an OS that gives a choice of desktops, but much less so on a system that doesn't. Especially not if that leaves users on those systems with defaults choices that were made by developers who's experience with those systems is more or less limited to the time they spend writing and testing the platform-specific code, before going back to Mother Linux. In fact, I wonder how much of this debate boils down to developers actually using the software they write and not just under Linux ... empty home folder? Which effectively means that target audience of Qt5 is much smaller than target audience of Qt4? You know, Qt4 works perfectly fine for me, except for a few naggles that are clearly present in Qt5 too ... O:-) The little I've seen of KF5 and Qt5 on my Linux rig really leaves me in no hurry at all to upgrade If there is no qtconfig and configuration files hierarchy, there should be another way of doing the same things. In my opinion, following list would solve the majority of issues: ... fontconfig ... XDG That's all that needed to make Qt5 look bearable on unconfigured/unsupported desktop. There you go ... Linux is the new MS Windows? :) Fontconfig is present on OS X but I highly doubt it is used by Qt (if it's like freetype, it's linked in, for unclear reasons). XDG does not exist on OS X. I'd guess that neither are present on a typical MS Windows set-up. R. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Wednesday 12 November 2014 12:18:02 René J.V. Bertin wrote: One of the really nice things in Qt4 was that one could take the appearance parameters available for individual applications (style, default font but also the font replacement table) and set them on a system/user-wide basis via qtconfig. From what I understand these individual settings still exist in Qt5, but the possibility to set them globally has been removed. Why is that, and what are the chances to get it back by popular request (or apopular request if it wasn't all that popular to begin with :)) ? It was removed for three reasons: 1) application self-containing: we don't want to open files we shouldn't, especially on more locked-down platforms like OS X 2) performance: we want to avoid hitting the disk if we can and parse configuration files 3) delegation: this is delegated to the platform theme plugins. Qt applications are meant to look like the system, therefore the the plugin will decide what the application should look like and which files it needs to read in order to come to the right decisions. We could provide a plugin that reads configuration files, but it would not be the default in any platform. This is coming from someone working on Linux and OS X, and who thinks that the default aqua style is a mixed bag. It somehow looks outdated, and spacing tends to be much too ample (on non-Retina displays at least). Also, the system default font (Lucida Grande) is applied even if this was changed through a utility like TinkerTool, and in the point size that even OS X uses only in menus and window titlebars (13 or even 14 point). That's just too large for most UI elements (and if scaling is done right I presume that to be true on Retina displays too). Maybe you should not use an OS that you don't like? Anyway, the majority opinion is that Qt should look like the OS's own look- and-feel. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
In the same line about the style, I was wondering the same thing to set a global style for a particular widgets a little while ago: http://qt-project.org/forums/viewthread/45862/ Would have been nice to avoid setting style to each controls individualy. The only things I see is making a singleton and use a CustomButton that go fetch it's style into the singleton. This help a lot when using style that can be changed at runtime (like a full theme, my application have 'Desktop', 'Default', 'Custom' and 'Custom Compact' for example. This mean using a custom wraper and maintain it for every controls. I asked the same questions to avoid this. I still would love too see something to avoid the singleton and those wraper that only set style. I also happen to have the desktop style problems compare to default style. http://qt-project.org/forums/viewthread/47952/ import qrc:/QtQuick/Controls/Styles/Desktop does the trick, thanks to jseeQt http://qt-project.org/mebmer/143119 to point it to me. Would be nice to have an official way to load those Desktop Style (or the current one used by default) if we need to change some of the properties. On Wed, Nov 12, 2014 at 3:46 PM, Thiago Macieira thiago.macie...@intel.com wrote: On Wednesday 12 November 2014 12:18:02 René J.V. Bertin wrote: One of the really nice things in Qt4 was that one could take the appearance parameters available for individual applications (style, default font but also the font replacement table) and set them on a system/user-wide basis via qtconfig. From what I understand these individual settings still exist in Qt5, but the possibility to set them globally has been removed. Why is that, and what are the chances to get it back by popular request (or apopular request if it wasn't all that popular to begin with :)) ? It was removed for three reasons: 1) application self-containing: we don't want to open files we shouldn't, especially on more locked-down platforms like OS X 2) performance: we want to avoid hitting the disk if we can and parse configuration files 3) delegation: this is delegated to the platform theme plugins. Qt applications are meant to look like the system, therefore the the plugin will decide what the application should look like and which files it needs to read in order to come to the right decisions. We could provide a plugin that reads configuration files, but it would not be the default in any platform. This is coming from someone working on Linux and OS X, and who thinks that the default aqua style is a mixed bag. It somehow looks outdated, and spacing tends to be much too ample (on non-Retina displays at least). Also, the system default font (Lucida Grande) is applied even if this was changed through a utility like TinkerTool, and in the point size that even OS X uses only in menus and window titlebars (13 or even 14 point). That's just too large for most UI elements (and if scaling is done right I presume that to be true on Retina displays too). Maybe you should not use an OS that you don't like? Anyway, the majority opinion is that Qt should look like the OS's own look- and-feel. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Wednesday November 12 2014 12:46:02 Thiago Macieira wrote: 1) application self-containing: we don't want to open files we shouldn't, especially on more locked-down platforms like OS X ?? Why would Qt (apps) not be able to open Qt configuration files? Thank goodness OS X hasn't yet become like iOS where indeed it would be complicated to have shared, global configuration settings. I'm a bit surprised to see disk access among the arguments, in a time where the first reaction to complaints about that are met with get an SSD ... We're talking about configuration parameters that are read exactly once when the application is starting up; that storage access must be completely drowned in the rest of the activity going on at that time. Maybe you should not use an OS that you don't like? That's off the point and not accurate. I cannot yet speak for 10.10, but earlier versions are fine with me (which is not to say they couldn't be better). It's Qt's Mac-native theme that gives a look that's somehow off to applications. You own Qt Creator definitely does not have the look and feel of a Mac application IMHO. Partly because applications typically do not use Lucida Grande 13 or 14 as their default font. Anyway, the majority opinion is that Qt should look like the OS's own look- and-feel. We're talking about giving choice, not about taking it away, but I'd like to see stats on that :) And also on what percentage thinks that user choice is even more important. And how many would actually prefer it if their application suite would look and feel the same regardless of what platform it runs on and use Qt in an attempt to achieve that. Setting a default style is almost feasible on OS X by making the bundle executable a shell script that calls the binary with a style choice. Same cannot be said about the default font, though. Anyway, don't you think it could at least be possible to set such configuration choices per application so they become persistent across restarts? R. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Wednesday 12 November 2014 23:10:49 René J.V. Bertin wrote: On Wednesday November 12 2014 12:46:02 Thiago Macieira wrote: 1) application self-containing: we don't want to open files we shouldn't, especially on more locked-down platforms like OS X ?? Why would Qt (apps) not be able to open Qt configuration files? Thank goodness OS X hasn't yet become like iOS where indeed it would be complicated to have shared, global configuration settings. OS X itself is not the problem. The Mac Store is. One of the issues people had in sending Qt4-based applications to the Mac Store was the fact that it read from and wrote to a global Trolltech.conf file. So that is gone. I'm a bit surprised to see disk access among the arguments, in a time where the first reaction to complaints about that are met with get an SSD ... We're talking about configuration parameters that are read exactly once when the application is starting up; that storage access must be completely drowned in the rest of the activity going on at that time. The time it takes to open a file and parse it, however small, is higher than the time it takes to do nothing. The problem is not one specific task that is done, it's the fact that we have a lot of those tasks and they add up. Besides, unless you're running Linux, your FS is slow. We can't tell people to only run Linux with Intel SSDs. Some people are trying to launch applications from eMMC or other slow storage, like an microSD card. And there's a lot of people trying to launch several Qt applications at the same time, on system boot. Maybe you should not use an OS that you don't like? That's off the point and not accurate. I cannot yet speak for 10.10, but earlier versions are fine with me (which is not to say they couldn't be better). It's Qt's Mac-native theme that gives a look that's somehow off to applications. You own Qt Creator definitely does not have the look and feel of a Mac application IMHO. Partly because applications typically do not use Lucida Grande 13 or 14 as their default font. I don't now if the Creator team intended to be different or not. You'll have to take this up with them. If they did not intend to be different, then you've found bugs and they should be fixed. Anyway, the majority opinion is that Qt should look like the OS's own look- and-feel. We're talking about giving choice, not about taking it away, but I'd like to see stats on that :) And also on what percentage thinks that user choice is even more important. And how many would actually prefer it if their application suite would look and feel the same regardless of what platform it runs on and use Qt in an attempt to achieve that. Oh, there are lots of those. But Qt and especially QtWidgets were meant to make native look and feel with cross-platform code. Being able to support your UX is an aside, not the main goal. If you want to do your own UX, you have Qt Quick -- just don't use Qt Quick Controls, and have absolute control over your UI. Setting a default style is almost feasible on OS X by making the bundle executable a shell script that calls the binary with a style choice. Same cannot be said about the default font, though. Agreed, the -style option should be removed, along with most options that Qt applications take on the command-line. Those are options for the application developer to use when writing the application, not meant to be used in production or, worse, be used by the user. Anyway, don't you think it could at least be possible to set such configuration choices per application so they become persistent across restarts? You have access to QSettings. Use it. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Wednesday November 12 2014 16:12:42 Thiago Macieira wrote: Setting a default style is almost feasible on OS X by making the bundle executable a shell script that calls the binary with a style choice. Same cannot be said about the default font, though. Agreed, the -style option should be removed, along with most options that Qt applications take on the command-line. Those are options for the application No, not agreed at all. That must have been a tongue-in-cheek remark, because I certainly wasn't implying that there were too many ways to change the default look and feel ... developer to use when writing the application, not meant to be used in production or, worse, be used by the user. Oh, horror, yes, the user using an option! I mean, we all know that only we developers know what's good for Joe User, right? (not ...) ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qt5 and global configuration
On Thursday 13 November 2014 01:46:56 René J.V. Bertin wrote: developer to use when writing the application, not meant to be used in production or, worse, be used by the user. Oh, horror, yes, the user using an option! I mean, we all know that only we developers know what's good for Joe User, right? (not ...) If you, as the application developer, means for your user to have control over that aspect of your application, you'll provide the option. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest