Re: [Interest] iOS device volume control on iOS 12+ with Qt

2019-10-16 Thread Jason H
Eh, I think my code works, if I select the speaker. I thought I was getting 
partial volume but i think I was getting full volume from the ear speaker.  
Curious to note: there is no way in Qt to do this, have to drop into 
AVFoundation to do that.
One of the many missing mobile features...

> Sent: Wednesday, October 16, 2019 at 3:43 PM
> From: "Jason H" 
> To: "interestqt-project.org" 
> Subject: [Interest] iOS device volume control on iOS 12+ with Qt
>
> This solution had been working for me:
> https://stackoverflow.com/questions/50737943/how-to-change-volume-programmatically-on-ios-11-4/50740074#50740074
>
> But it seems that I can't get away with an MPVolumeView anymore. However the 
> proposed solution isn't working for me as I am not sure how to patch that 
> into a Qt iOS app.
> [UIApplication sharedApplication].windows is an array, but I am not sure what 
> dragons are there with Qt.
>
> Anyway, even patching in [UIApplication sharedApplication].windows[0] doesn't 
> seem to be working.
> I don't care about hiding the MPVolumeView. I just need it to work
>
> void setVolume(double volume){
>   UIWindow *mainWindow = [UIApplication sharedApplication].windows[0];
>   //UIView *mainWindow = [UIView new];
>   MPVolumeView *volumeView = [MPVolumeView new];
>   UISlider *volumeViewSlider = nil;
>   [mainWindow addSubview:volumeView];
>
>   for (UIView *view in volumeView.subviews) {
> if ([view isKindOfClass:[UISlider class]]) {
>   volumeViewSlider = (UISlider *)view;
>   break;
> }
>   }
>   if (volumeViewSlider != nil) {
>   dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 
> * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
>   volumeViewSlider.value = volume;
>   NSLog(@"volumeViewSlider  set to %1.3f", volume);
>   });
>   } else {
>   NSLog(@"volumeViewSlider is nil");
>   }
> }
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] iOS device volume control on iOS 12+ with Qt

2019-10-16 Thread Jason H
This solution had been working for me:
https://stackoverflow.com/questions/50737943/how-to-change-volume-programmatically-on-ios-11-4/50740074#50740074

But it seems that I can't get away with an MPVolumeView anymore. However the 
proposed solution isn't working for me as I am not sure how to patch that into 
a Qt iOS app.
[UIApplication sharedApplication].windows is an array, but I am not sure what 
dragons are there with Qt.

Anyway, even patching in [UIApplication sharedApplication].windows[0] doesn't 
seem to be working.
I don't care about hiding the MPVolumeView. I just need it to work

void setVolume(double volume){
UIWindow *mainWindow = [UIApplication sharedApplication].windows[0];
//UIView *mainWindow = [UIView new];
MPVolumeView *volumeView = [MPVolumeView new];
UISlider *volumeViewSlider = nil;
[mainWindow addSubview:volumeView];

for (UIView *view in volumeView.subviews) {
  if ([view isKindOfClass:[UISlider class]]) {
volumeViewSlider = (UISlider *)view;
break;
  }
}
if (volumeViewSlider != nil) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 
* NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
volumeViewSlider.value = volume;
NSLog(@"volumeViewSlider  set to %1.3f", volume);
});
} else {
NSLog(@"volumeViewSlider is nil");
}
}
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] CPU load in busy indicator widget based on Q(Variant)Animation

2019-10-16 Thread Thiago Macieira
On Wednesday, 16 October 2019 06:33:55 PDT René J.V. Bertin wrote:
> What would be the proper way to implement something that behaves like a
> QTimer with delay 0 (= fire as soon as the event loop becomes available)
> but with an interval (= fire as soon as the event loop becomes available
> after at least X msec of pause)?

Just use a QTimer with the timeout that you want. The timeout you give is a 
minimum value. If it gets overrun, it'll simply wake up late. The next time 
out after that is adjusted: if one timer is late by over 100%, you'll still be 
woken up only once.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] CPU load in busy indicator widget based on Q(Variant)Animation

2019-10-16 Thread René J . V . Bertin
A thought:

What would be the proper way to implement something that behaves like a QTimer 
with delay 0 (= fire as soon as the event loop becomes available) but with an 
interval (= fire as soon as the event loop becomes available after at least X 
msec of pause)? Add a QThread::msleep() call inside the timer callback? Or does 
that method use QTimer() internally, leading to some kind of interaction 
leading to an implementation that still keeps updating faster than would be 
good when something more useful is actually busy? Either way I suppose that 
this has little to no benefit in case the actual work task runs independently 
from the eventloop, right?

R.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Change in open-source licensing of Qt Wayland Compositor, Qt Application Manager and Qt PDF

2019-10-16 Thread Lars Knoll
Hi,

As it turned out, there was some miscommunication that happened regarding the 
re-licensing of Qt PDF, and not all contributors were on board regarding the 
license change. That means we’re not changing the modules license and won’t be 
adding it to become a supported part of Qt until this has been sorted out.

Cheers,
Lars

On 10 Oct 2019, at 10:00, Tuukka Turunen 
mailto:tuukka.turu...@qt.io>> wrote:


Hi,

Open-source licensing of Qt Wayland Compositor, Qt Application Manager and Qt 
PDF is to be changed from LGPLv3/Commercial to GPLv3/Commercial. Change becomes 
in effect with Qt 5.14 release. Going forward, these modules are no longer 
available under LGPLv3 license option. The key rationale for this is to 
increase the amount of GPLv3/Commercial licensed Qt add-ons. Blog post 
announcement of this is at: 
https://www.qt.io/blog/change-in-open-source-licensing-of-qt-wayland-compositor-qt-application-manager-and-qt-pdf

Qt Wayland Compositor and Application Manager are mainly used in complex multi 
process embedded systems. The Wayland Compositor is a special purpose module 
and is not used on desktop and mobile platforms. The module does require 
significant ongoing investments and licensing it under GPLv3 will help cover 
those expenses. The Application Manager is using the Wayland Compositor. It is 
currently not part of Qt and only available through the Automotive Suite, but 
being developed on qt-project.org. Qt PDF is a new 
module, which has not been released earlier despite the pre-release code being 
available. Changing the license to GPLv3 will allow The Qt Company to support 
the module going forward.

Since January 2016 many of the completely new Qt add-on modules developed by 
The Qt Company have been licensed under GPLv3 license for open-source users in 
addition to the commercial licensing option. We use GPLv3 license for the 
selected Qt Add-Ons in order for those making closed-source applications or 
devices to pick the commercial option when using these add-on modules, while 
still providing the functionality under an open-source license for open-source 
applications.

In addition to developers from The Qt Company, the main contributors of these 
modules are from Luxoft and KDAB. We have discussed the license change 
beforehand with both of them and they accept making this license change.

The change in licensing of Qt Wayland Compositor, Qt Application Manager and Qt 
PDF is implemented in the coming days to be in effect by Qt 5.14 release 
timeframe and later releases.

Yours,

Tuukka Turunen
The Qt Company




___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Dark mode for other platforms

2019-10-16 Thread Vadim Peretokin
No problem! Thanks for the answer.

In the meantime we can use stylesheets for this:
https://github.com/ColinDuquesnoy/QDarkStyleSheet

On Wed, Oct 16, 2019 at 2:44 PM Mårten Nordheim 
wrote:

> On 16.10.2019 14:38, Vadim Peretokin wrote:
> > But Qt on Windows doesn't automatically obey this dark mode like it does
> > on macOS - is there anything I can do to nudge it that way?
>
> Unfortunately not, it just hasn’t been implemented in Qt yet for various
> reasons.
>
> Although there has been some work on it recently by Friedemann
> https://codereview.qt-project.org/c/qt/qtbase/+/275191
> https://bugreports.qt.io/browse/QTBUG-72028
>
> Mårten
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Dark mode for other platforms

2019-10-16 Thread Mårten Nordheim
On 16.10.2019 14:38, Vadim Peretokin wrote:
> But Qt on Windows doesn't automatically obey this dark mode like it does 
> on macOS - is there anything I can do to nudge it that way?

Unfortunately not, it just hasn’t been implemented in Qt yet for various 
reasons.

Although there has been some work on it recently by Friedemann
https://codereview.qt-project.org/c/qt/qtbase/+/275191
https://bugreports.qt.io/browse/QTBUG-72028

Mårten
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Dark mode for other platforms

2019-10-16 Thread Vadim Peretokin
But Qt on Windows doesn't automatically obey this dark mode like it does on
macOS - is there anything I can do to nudge it that way?
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Dark mode for other platforms

2019-10-16 Thread Mårten Nordheim
On 16.10.2019 13:59, Nikos Chantziaras wrote:
> On 15/10/2019 13:46, Allan Sandfeld Jensen wrote:
>> On Tuesday, 15 October 2019 11:58:42 CEST Vadim Peretokin wrote:
>>> Hello!
>>>
>>> I've noticed that Qt on macOS now automatically uses dark mode, and it
>>> looks amazing
>>> . My
>>> question is: how can I enable this for Windows and Linux as well?
>>>
>> Linux and Window have had such modes forever.
> 
> Well, I wouldn't say "forever" in the case of Windows. It only got a 
> dark mode theme exactly 1 year ago (October 2018.) Which is one month 
> *after* macOS 10.14 was released (September 2018.)

Dark theme / dark mode was added in August 2016 :)
https://blogs.windows.com/windowsexperience/2016/08/08/windows-10-tip-personalize-your-pc-by-enabling-the-dark-theme/

Mårten
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Dark mode for other platforms

2019-10-16 Thread Allan Sandfeld Jensen
On Wednesday, 16 October 2019 13:59:54 CEST Nikos Chantziaras wrote:
> On 15/10/2019 13:46, Allan Sandfeld Jensen wrote:
> > On Tuesday, 15 October 2019 11:58:42 CEST Vadim Peretokin wrote:
> >> Hello!
> >> 
> >> I've noticed that Qt on macOS now automatically uses dark mode, and it
> >> looks amazing
> >> . My
> >> question is: how can I enable this for Windows and Linux as well?
> > 
> > Linux and Window have had such modes forever.
> 
> Well, I wouldn't say "forever" in the case of Windows. It only got a
> dark mode theme exactly 1 year ago (October 2018.) Which is one month
> *after* macOS 10.14 was released (September 2018.)

Windows have had color schemes since at least Window95. It recently added a 
single button to switch the default white color scheme to a dark one, instead 
of selecting a dark on from a list of schemes, but the ability to change them 
has existed for 25 years if not more.

'Allan


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Dark mode for other platforms

2019-10-16 Thread Nikos Chantziaras

On 15/10/2019 13:46, Allan Sandfeld Jensen wrote:

On Tuesday, 15 October 2019 11:58:42 CEST Vadim Peretokin wrote:

Hello!

I've noticed that Qt on macOS now automatically uses dark mode, and it
looks amazing
. My
question is: how can I enable this for Windows and Linux as well?


Linux and Window have had such modes forever.


Well, I wouldn't say "forever" in the case of Windows. It only got a 
dark mode theme exactly 1 year ago (October 2018.) Which is one month 
*after* macOS 10.14 was released (September 2018.)

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest