Re: [Interest] Embedding a QTextBrowser in a QML application: QObject: Cannot create children for a parent that is in a different thread

2022-04-01 Thread Jeffrey Brendecke
Thanks to all for your comments!

I took a closer look given what Shawn wrote and looked at it through a debugger.

// main.cpp
#include 
#include 

int main( int argc, char* argv[] )
{
QApplication app{ argc, argv };
QQmlApplicationEngine engine;
const QUrl url{ u"qrc://main.qml"_qs };
QObject::connect( 
, 
::objectCreated,
, 
[url]( QObject* obj, const QUrl& objUrl ) { if (!obj && url == objUrl){ 
QCoreApplication::exit(-1); } },
Qt::QueuedConnection
);
engine.load( url );
int exitCode{ app.exec() };
return exitCode;
}

The QTextBrowser and QTextDocument instances are instantiated in the main 
thread but the QSGRenderThread does not start running until after the call to 
app.exec(), at which time the content supplied to the QTextBrowser (and to the 
QTextDocument) is rendered. At that point, the app crashes while the layout is 
occurring on the QSGRenderThread.

As the problem is occurring in the Qt code, of course being used in a way it is 
not intended to be used in (a widget being used in a QML app), I am not going 
to pursue this approach anymore.

This will need to run on iOS, so I don’t think creating a widget app would work 
well.

Using TextEdit is a possibility as mentioned and I will look into it. It has, 
however, another larger shortcoming in that I cannot alter its QTextDocument 
from C++ (as I understand I could have with QTextBrowser), which would be of 
great use to me beyond what I have described. I’ll have to think about how to 
make it work for my purposes.

I’ll consider logging a feature request (thanks for the suggestion!) once I 
have thought this through.

Thanks again!

Sincerely,

Jeffrey Brendecke

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


[Interest] Embedding a QTextBrowser in a QML application: QObject: Cannot create children for a parent that is in a different thread

2022-03-29 Thread Jeffrey Brendecke
For an app I am working on I need a component for displaying HTML rich text. 
TextEdit does not provide an important feature I need present in QTextEdit and 
QTextBrowser: scrollToAnchor( const QString& ).

The app will have to work on iOS, so WebEngine is out of the question, and I 
would not want to have all the overhead of having a web browser in the app 
anyways.

Given the text itself is fairly simple (no images, just formatted text), 
QTextBrowser gives me what I need.

I have been looking into trying to embed a QTextBrowser into a QML application 
using the approach in this project:

https://www.alex-spataru.com/blog/using-qt-widgets-in-your-qmlqtquick-applications
 
.
 (QmlPlainTextEdit)

A similar approach is used here:

https://github.com/mosolovsa/qmlplot 


This involves:
* Creating a class deriving from QQuickPaintedItem
* Encapsulating an instance of QTextBrowser instantiated with a nullptr parent 
as a member in that class
* Rendering from the QTextBrowser into the QQuickPaintedItem derivative
* Hooking up the necessary events between the QQuickPaintedItem and the 
QTextBrowser instance

That all seems to be no problem. The problem I get results in a segmentation 
fault:

“””
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QTextDocument(0x5617e2ebed80), parent's thread is 
QThread(0x5617e2958860), current thread is QSGRenderThread(0x5617e2d18400)
“”"

The crash occurs after passing the URL to open via QTextBrowser::setSource( 
const QUrl&, QTextDocument::ResourceType ) though not immediately.

Note: I am using Qt 6.3.0-rc on Kubuntu Linux 21.10.

The qmlplot application will compile and run on Qt 5.15.8 (with warnings) but 
not on 6.3.0-rc (lots of errors and warnings). However, it does not involve a 
widget containing an instance of QTextDocument. I have not tried the code 
directly in QmlPlainTextEdit, but I did notice the source sites are no longer 
available.

I am aware that, assuming this can be made to work, that performance may be CPU 
intensive especially with antialiasing, but I wanted to give it a try before 
looking into alternatives.

Thanks very much in advance!

Sincerely,

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


Re: [Interest] L Word

2021-04-30 Thread Jeffrey Brendecke
I, too, am one of those list lurkers looking for interesting information and 
discussions on Qt, but all too often I instead see posts from one unpleasant 
person repeatedly dominating discussions with belligerent, non-productive 
rantings. I wonder why he even uses Qt or even spends time thinking about it.

Given that there is at least one large development company in the US making 
money off using Qt on medical devices, among others, I think that this one 
difficult person is definitely not the sole fountain of knowledge on the 
subject and should not be given more credence than necessary. If Qt has 
short-comings in the medical device realm, constructive discussion would bring 
more than infantile rants. He would have done better to convince the Qt Company 
to hire him on as a consultant to improve their technology for use on medical 
devices, as that seems to be something the company wants to be successful in. 
Instead, I would not want to go anywhere near the guy

I have experienced Giuseppe D'Angelo as a fabulous, caring instructor and am 
sorry to see him leave this discussion. All of us are the poorer because of it.

If any person's postings on this list (or really in any context) are causing 
excellent contributors like Giuseppe to leave, then that is a very good 
indication that that person needs to be removed from the list.

Jeffrey

-

> On Apr 29, 2021, at 21:30, Rui Oliveira  wrote:
> 
> And so we lost one of the most active, contributing, and knowledgeable 
> members of this mailing list. 
> 
> Cue "the worst trade deal maybe ever signed anywhere" meme. 
> 
> I was thinking of putting him in CC but I don't think I should bother the 
> man. 
> 
> I sure did respect Giuseppe, and I can totally get behind his no-BS 
> personality.
> 
> With wishes of talking about code again,
> Rui
> 
> Às 09:22 de 29/04/2021, Giuseppe D'Angelo via Interest escreveu:
>> On 29/04/2021 00:42, Giuseppe D'Angelo via Interest wrote: 
>>> If the answer is yes, you were lying. If the answer is no, or you don't 
>>> answer, then you're trolling the mailing list. You'll get my apology; 
>>> I'll even throw in, for free, my personal congratulations for the long 
>>> trolling. But, you'll get a nice permanent ban from here. 
>> 
>> No reply. Yes, you're not the only one who can set arbitrary deadlines for 
>> other people, pal. 
>> 
>> 
>> I'll just go with the script then: you DID believe those links to be true. 
>> 
>> Then, please accept my deepest and most sincere apologies for calling you a 
>> liar. 
>> 
>> I'll state it again, very clearly, all uppercase: 
>> 
>> YOU NEVER LIED. I WAS WRONG. 
>> 
>> Please accept the attached fruit basket as a gesture of good will. 
>> 
>> === 
>> 
>> Where does this leave us, then? 
>> 
>> At BEST, you have been trolling the mailing list, sending inflammatory false 
>> content with the purpose of getting a strong reaction from the participants. 
>> 
>> At WORST, you have demonstrated some abysmal gross incompetence, since in 
>> order to win an argument you: 
>> 
>> * googled some keywords; 
>> * got the first couple of links that seemed to match your thesis; 
>> * didn't even bother to read the contents; 
>> * pasted the links here believing they were true, without questioning the 
>> veracity of such explosive statements; 
>> * when busted, dug your hole even deeper by keeping arguing in that 
>> direction. 
>> 
>> (...I'm not alone about bringing this possibility forward...) 
>> 
>> Spoiler alert, the links were April fools' jokes. They have never been true, 
>> and it was even written in the articles that they were jokes. With such 
>> precedents, why should anyone believe *any* other argument you bring 
>> forward? 
>> 
>> === 
>> 
>> In either case, it is abundantly clear who's full of shit around here. 
>> 
>> It is also clear to me that moderation on this list doesn't exist, or if it 
>> exists, it doesn't want to get sides, and/or considers these behaviours 
>> acceptable. 
>> 
>> I don't. And I don't send ultimatums or threats of libel lawsuits 
>> (seriously?) around, including to the moderators, in order to force them to 
>> make a move. 
>> 
>> Hence, I'll be removing myself from this list, effective immediately. 
>> 
>> 
>> You win. Audience claps. Curtains. 
>> 
>> Ad astra per aspera, 
>> 
>> 
>> ___
>> 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 mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Drawing a path in QML through animation

2018-11-16 Thread Jeffrey Brendecke
Is there a way to animate the drawing of a path as an item moves along it?

* Initial condition: Only the item (e.g., an arrowhead) is visible
* End condition: The stroked path along which the item travelled is visible 
from the initial point to the item's final location

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


Re: [Interest] Native windows with QtCore backend

2018-10-29 Thread Jeffrey Brendecke


> 
> On Sunday, 28 October 2018 08:58:57 PDT Jeffrey Brendecke wrote:
>> Is it possible to have a 100% native UI (Cocoa or UIKit) with backend QtCore
>> components (nonGUI) on a functioning event loop for signals and slots on
>> macOS and iOS?
> 
> Sure. But you need to integrate the event loops, so one of these three things:
> 
> 1) use the Core Foundation event dispatcher (and make sure it works)
> 
> 2) tell your native UI event dispatcher to use QSocketNotifier and QTimer
> 
> 3) write an event dispatcher deriving from QAbstractEventDispatcher that 
> integrates QSocketNotifier and QTimer with your native UI's dispatcher
> 
> The event dispatcher you really want is called QCocoaEventDispatcher, but 
> it's 
> in the Cocoa QPA plugin, which requires QtGui.
> 
>> For example, I would like use the Qt network components to interact with a
>> network while using only native windows and native views for the
>> presentation.
> 
> Option 4: only use Qt components outside the main thread.
> 
> -- 
> 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

-

Thanks, Thiago,

Regarding: 1-3, I was afraid something like that would be the case after 
looking at the Qt-Mac integration code.

Option 4 looks like a possibility for me.

It looks like it means that as long as I run QCoreApplication::exec() on its 
own thread, that I can do all the Qt event handling/signal slot connections I 
want on that thread and not worry about what's going on on the main 
thread/Apple event loop until I need to synchronize data with the main thread. 
Then, it would be nothing more than what is normally involved with 
synchronizing data between threads.

Is this correct?

Thanks in advance,

Jeffrey


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


[Interest] Native windows with QtCore backend

2018-10-28 Thread Jeffrey Brendecke
Is it possible to have a 100% native UI (Cocoa or UIKit) with backend QtCore 
components (nonGUI) on a functioning event loop for signals and slots on macOS 
and iOS?

For example, I would like use the Qt network components to interact with a 
network while using only native windows and native views for the presentation.


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


Re: [Interest] Sample Code for Apple TV and Apple Watch Qt Garage demos at Qt World Summit 2016

2018-10-18 Thread Jeffrey Brendecke


> On Oct 17, 2018, at 19:24, Christophe THOMAS  wrote:
> 
> Hello,
> 
> Pretty interested too in having some qt code running on an Apple Watch. My 
> current understanding is that displaying something is hard and anyway qwidget 
> and qml is not feasible?
> 
> Thx
> 
> Christophe
> 
> Le 17 oct. 2018 à 14:38, Jeffrey Brendecke  <mailto:jeffrey.brende...@gmail.com>> a écrit :
> 
Hello Christophe,

I don't know about widgets, but it is possible for a QML application to run on 
AppleTV. Like iOS, AppleTV is based on UIKit, and has a very large overlap with 
what is available on iOS.

To do that you need to compile Qt for AppleTV. As far as I know, it is still 
considered in Technical Preview, with all that is entailed with that 
limitation. Additionally, there are Apple-imposed limitations regarding storage 
on the device.

Navigation does not work with QML out of the box, so there is some work that 
needs to be done there.

Here are some links that may be of help:
http://blog.qt.io/blog/2017/01/30/whats-new-in-qt-on-apple-platforms/
https://www.kdab.com/creating-qt-5-port-apple-tvos/
https://wiki.qt.io/Support_for_iOS_and_tvOS

Also, there is the Qt example planets-qml. Take a look in the code. Navigation 
and interaction with the Sliders is implemented using QML/JavaScript. It's a 
little raw in its feel, but it does work. Ideally, the swipe gestures would 
need to be trapped in Objective-C.

I have not tried QML on the AppleWatch, but the planets-qml sample has a non-Qt 
working implementation that interacts with the main sample app. WatchKit is not 
based on UIKit so there is no visual support as far as I know, but Qt could 
potentially be used for business logic. Please check the code in the 
planets-watchos directory of the sample planets-qml.

This link points to a comparative discussion of WatchKit:

https://nshipster.com/watchkit/

Jeffrey

>> 
>> 
>>> On Oct 17, 2018, at 14:20, Mike Krus >> <mailto:mike.k...@kdab.com>> wrote:
>>> 
>>>> 
>>>> On 17 Oct 2018, at 12:52, Jeffrey Brendecke >>> <mailto:jeffrey.brende...@gmail.com>> wrote:
>>>> 
>>>> Would anyone know where I could find the sample code from these demos?
>>>> 
>>>> http://www.qtworldsummit.com/2016/discover-future-concepts-and-real-world-products-from-the-qt-garage/
>>>>  
>>>> <http://www.qtworldsummit.com/2016/discover-future-concepts-and-real-world-products-from-the-qt-garage/>
>>>> 
>>>> Apple TV with Qt
>>>> – Apps & Multiplayer Games on iOS, Apple TB and Android by V-play
>>>> 
>>>> iOS and watchOS with Qt
>>>> – Displaying watch app controlling Qt 3D Planets over the local network
>>> I believe this one is part of actual qt3d, although I can’t remember for 
>>> sure if the patch was merged or not
>>> 
>>> 
>>> Mike
>>> 
>> 
>> Thanks, Mike!
>> 
>> Yes, everything appears to be there in the planets-qml example.
>> 
>> Jeffrey
>> ___
>> Interest mailing list
>> Interest@qt-project.org <mailto:Interest@qt-project.org>
>> http://lists.qt-project.org/mailman/listinfo/interest 
>> <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] Sample Code for Apple TV and Apple Watch Qt Garage demos at Qt World Summit 2016

2018-10-17 Thread Jeffrey Brendecke


> On Oct 17, 2018, at 14:20, Mike Krus  wrote:
> 
>> 
>> On 17 Oct 2018, at 12:52, Jeffrey Brendecke > <mailto:jeffrey.brende...@gmail.com>> wrote:
>> 
>> Would anyone know where I could find the sample code from these demos?
>> 
>> http://www.qtworldsummit.com/2016/discover-future-concepts-and-real-world-products-from-the-qt-garage/
>>  
>> <http://www.qtworldsummit.com/2016/discover-future-concepts-and-real-world-products-from-the-qt-garage/>
>> 
>> Apple TV with Qt
>> – Apps & Multiplayer Games on iOS, Apple TB and Android by V-play
>> 
>> iOS and watchOS with Qt
>> – Displaying watch app controlling Qt 3D Planets over the local network
> I believe this one is part of actual qt3d, although I can’t remember for sure 
> if the patch was merged or not
> 
> 
> Mike
> 

Thanks, Mike!

Yes, everything appears to be there in the planets-qml example.

Jeffrey___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Sample Code for Apple TV and Apple Watch Qt Garage demos at Qt World Summit 2016

2018-10-17 Thread Jeffrey Brendecke
Would anyone know where I could find the sample code from these demos?

http://www.qtworldsummit.com/2016/discover-future-concepts-and-real-world-products-from-the-qt-garage/

Apple TV with Qt
– Apps & Multiplayer Games on iOS, Apple TB and Android by V-play

iOS and watchOS with Qt
– Displaying watch app controlling Qt 3D Planets over the local network


Sincerely,

Jeffrey Brendecke

Jeffrey Brendecke Software Services
Alt-Tegel 6
13507 Berlin
Germany

Tel: +49 151 4664-8751
Fax: +49 30 4309-3316‬
Email: jeffrey.brende...@gmail.com

VAT No: DE 301972289

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


Re: [Interest] Command used by Qt Creator to deploy Apps to iOS devices

2018-03-06 Thread Jeffrey Brendecke


> On 5. Mar 2018, at 15:26, Jeffrey Brendecke <jeffrey.brende...@gmail.com> 
> wrote:
> 
> Which command is used by Qt Creator to deploy apps to iOS devices?
> 
> The build logs show everything up through building and signing, but the 
> output goes silent during the deploy phase.

--

I answered my own question by digging around and looking at the Qt Creator 
source:

https://code.qt.io/qt-creator/qt-creator.git 
<https://code.qt.io/qt-creator/qt-creator.git>

The code here:
qt-creator/src/tools/iostool/iosdevicemanager.*

Is a C++ variation of the code in ios-deploy, used for PhoneGap:

https://github.com/phonegap/ios-deploy <https://github.com/phonegap/ios-deploy>

It looks like Apple does not want to make the step of creating custom deploy 
tools to an iOS device very easy.___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Command used by Qt Creator to deploy Apps to iOS devices

2018-03-05 Thread Jeffrey Brendecke
Which command is used by Qt Creator to deploy apps to iOS devices?

The build logs show everything up through building and signing, but the output 
goes silent during the deploy phase.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt iOS - HowTo get access to Images stored at device

2017-10-27 Thread Jeffrey Brendecke

> On 26. Oct 2017, at 16:11, Shawn Rutledge <shawn.rutle...@qt.io> wrote:
> 
> 
>> On 26 Oct 2017, at 15:12, ekke <e...@ekkes-corner.org> wrote:
>> 
>> Jeffrey,
>> 
>> thx
>> 
>> at the moment it's ok for me to use 
>> QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).last()
>> 
>> Using Objective-C++ Photos framework would give some more comfort,
>> but wouldn't help to access these Photos from QML
> 
> From QML, the QtQuick.Dialogs FileDialog has special support for getting a 
> native photo picker:
> 
> http://doc.qt.io/qt-5/qml-qtquick-dialogs-filedialog.html#folder-prop
> 
>> it seems that there's no way to construct an URL in QML to access files from 
>> assets-library
>> so probably the best way is to write an ImageProvider to access these Images 
>> from QML
> 
> After you choose the photo, you will get a URL which works AFAIK.
> 
> The code is in 
> qtbase/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
>  (called from qiosfiledialog.mm)
> 
>> Am 26.10.17 um 14:52 schrieb Jeffrey Brendecke:
>>> 
>>>> On 26. Oct 2017, at 13:10, interest-requ...@qt-project.org wrote:
>>>> 
>>>> ...
>>> 
>>> Hello Ekke,
>>> 
>>> It looks like the Asset Library Framework has been deprecated as of iOS 9:
>>> 
>>> https://developer.apple.com/documentation/photos/phasset?language=objc
>>> 
>>> The new way to access the assets is through the Photos framework. The above 
>>> link contains links to the relevant classes. The Photos framework is 
>>> feature rich and allows you to access images separate from their adjustment 
>>> data or with the adjustments applied.
> 
> If you think Qt is using the deprecated API, and needs to be updated, you can 
> write up a bug about it.
> 

I just logged the following bug after having searched to see if this had been 
reported before:

https://bugreports.qt.io/issues/?filter=-5=resolution%20%3D%20Unresolved%20AND%20text%20~%20%22assets%22%20order%20by%20priority%20DESC%2Cupdated%20DESC
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Compiling the latest Qt versions post-5.10

2017-10-26 Thread Jeffrey Brendecke

> On 22. Oct 2017, at 21:23, Jeffrey Brendecke <jeffrey.brende...@gmail.com> 
> wrote:
> 
> 
>> On 22. Oct 2017, at 15:42, Sze Howe Koh <szehowe@gmail.com 
>> <mailto:szehowe@gmail.com>> wrote:
>> 
>> On 22 October 2017 at 20:21, Jeffrey Brendecke
>> <jeffrey.brende...@gmail.com <mailto:jeffrey.brende...@gmail.com>> wrote:
>>> 
>>> On 21. Oct 2017, at 15:56, Jeffrey Brendecke <jeffrey.brende...@gmail.com 
>>> <mailto:jeffrey.brende...@gmail.com>>
>>> wrote:
>>> 
>>> Is it possible to access the latest development branches for Qt versions
>>> after 5.10?
>>> 
>>> If so, where do I get the source and are there compilation/installation
>>> instructions beyond what is found here:
>>> 
>>> https://wiki.qt.io/Building_Qt_5_from_Git 
>>> <https://wiki.qt.io/Building_Qt_5_from_Git>
>>> 
>>> 
>>> The process for cloning and checking out the dev branch goes fine until
>>> qtnetworkauth. At that point I am consistently prompted to authenticate,
>>> which does not succeed with my GitHub account.
>>> 
>>> Do I need to be registered anywhere as a user in order to get access? I just
>>> want read-only access at this time.
>>> 
>>> $ git clone https://github.com/qtproject/qt5.git --branch dev
>> 
>> No registration is required.
>> 
>> 
>> === EXPLANATION ===
>> Some time ago, the libraries moved from https://github.com/qtproject/ 
>> <https://github.com/qtproject/>
>> to https://github.com/qt/ <https://github.com/qt/>.
>> 
>> So, https://github.com/qtproject/qt5.git 
>> <https://github.com/qtproject/qt5.git> now redirects to
>> https://github.com/qt/qt5.git <https://github.com/qt/qt5.git> (try it in 
>> your web browser). GitHub
>> takes care of the redirection when you clone.
>> 
>> However, Qt Network Authorization is a much newer module. It never
>> existed under the old qtproject account, so a redirection doesn't
>> exist. You can go to https://github.com/qt/qtnetworkauth.git 
>> <https://github.com/qt/qtnetworkauth.git>, but
>> https://github.com/qtproject/qtnetworkauth.git 
>> <https://github.com/qtproject/qtnetworkauth.git> gives error 404.
>> 
>> 
>> === SOLUTION ===
>> If you edit your the qt5/.git/config file and set remote "origin" to
>> https://github.com/qt/qt5.git <https://github.com/qt/qt5.git>, you should be 
>> able to run the
>> init-repository script again. (You might need to use the --force
>> option)
>> 
>> If all that is too hard, you can also delete everything, clone
>> https://code.qt.io/qt/qt5.git <https://code.qt.io/qt/qt5.git> (as 
>> recommended by the wiki), and run
>> init-repository from scratch.
>> 
>> 
>>> $ cd qt5
>>> $ git checkout dev
>>> $ perl init-repository
>>> --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
>>> 
>>> Error message:
>>> + git clone --no-checkout https://github.com/qtproject/qtnetworkauth.git 
>>> <https://github.com/qtproject/qtnetworkauth.git>
>>> qtnetworkauth
>>> Cloning into 'qtnetworkauth'...
>>> Username for 'https://github.com': <https://github.com'/> 
>>> Password for 'https://x...@github.com': <https://x...@github.com'/>
>>> remote: Invalid username or password.
>>> fatal: Authentication failed for
>>> 'https://github.com/qtproject/qtnetworkauth.git/ 
>>> <https://github.com/qtproject/qtnetworkauth.git/>'
>>> git clone --no-checkout https://github.com/qtproject/qtnetworkauth.git 
>>> <https://github.com/qtproject/qtnetworkauth.git>
>>> qtnetworkauth exited with status 32768 at init-repository line 198.
>>> Qt::InitRepository::exe('Qt::InitRepository=HASH(0x7f89f2803ff0)', 'git',
>>> 'clone', '--no-checkout', 'https://github.com/qtproject/qtnetworkauth.git 
>>> <https://github.com/qtproject/qtnetworkauth.git>',
>>> 'qtnetworkauth') called at init-repository line 534
>>> Qt::InitRepository::git_clone_one_submodule('Qt::InitRepository=HASH(0x7f89f2803ff0)',
>>> 'qtnetworkauth', 'qtnetworkauth.git', 0) called at init-repository line 407
>>> Qt::InitRepository::git_clone_all_submodules('Qt::InitRepository=HASH(0x7f89f2803ff0)',
>>> 'qt5', 0, 'preview', 'essential', 'addon', 'deprecated', '-qtwebkit',
>>> '-qtwebkit-examples', ...) called at init-repository line 644
>>> Qt::InitRep

Re: [Interest] Qt iOS - HowTo get access to Images stored at device

2017-10-26 Thread Jeffrey Brendecke

> On 26. Oct 2017, at 13:10, interest-requ...@qt-project.org wrote:
> 
> From: ekke >
> Subject: Re: [Interest] Qt iOS - HowTo get access to Images stored at device
> Date: 26. October 2017 at 08:07:10 GMT+2
> To: "interest@qt-project.org " 
> >
> 
> 
> Hi Michael,
> 
> it's the other way around (C++ to QML)
> 
> from
> QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).last()
> 
> I create QDir and from entryInfoList() I'm getting QFileInfo and use 
> .filePath() to open QFile, so I can upload the Image to REST Service
> This works on Android for all Locations and also iOS assets-library
> 
> Now I also want to display this filePath as QML Image
> I did it this way and it worked on Android, also on iOS if dealing with App 
> Data, but not for assets-library
> source: "file://" <>+currentFile.path
> BTW: most examples I found are forming the Url for QML Image source by 
> concatenation
> 
> from Thiago I learned that I shouldn't do this, so I tried
> source: Qt.resolvedUrl("file://" <>+currentFile.path)
> but this seems also to be wrong because I'm again forming the URL by 
> concatenation
> 
> so now I'm having two questions:
> a) HowTo set QML Image source the correct way without concatenation
> b) what's the correct URI under iOS for assets-library to be used in QML 
> Image source
> 
> thx
> 
> ekke
> 
> 
> Am 25.10.17 um 20:19 schrieb Michael R Nelson:
>> Hi,
>> 
>> Here's how I make use of path passed as QString from QML context:
>> 
>> void MyClass::saveImage(const QString )
>> {
>>QFileInfo fi(QUrl(path).toLocalFile());
>>if (fi.exists())
>>   // refer to file as fi.filePath();
>> }
>> 
>> Hope this helps.
>> 
>> Mike
> 

Hello Ekke,

It looks like the Asset Library Framework has been deprecated as of iOS 9:

https://developer.apple.com/documentation/photos/phasset?language=objc 


The new way to access the assets is through the Photos framework. The above 
link contains links to the relevant classes. The Photos framework is feature 
rich and allows you to access images separate from their adjustment data or 
with the adjustments applied.

The solution involves working with Objective-C++, but using this API is 
probably unavoidable given that Apple has moved away from managing images as 
files on a local file system.

I hope this is of help to you,

Jeffrey___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Compiling the latest Qt versions post-5.10

2017-10-22 Thread Jeffrey Brendecke

> On 22. Oct 2017, at 15:42, Sze Howe Koh <szehowe@gmail.com> wrote:
> 
> On 22 October 2017 at 20:21, Jeffrey Brendecke
> <jeffrey.brende...@gmail.com> wrote:
>> 
>> On 21. Oct 2017, at 15:56, Jeffrey Brendecke <jeffrey.brende...@gmail.com>
>> wrote:
>> 
>> Is it possible to access the latest development branches for Qt versions
>> after 5.10?
>> 
>> If so, where do I get the source and are there compilation/installation
>> instructions beyond what is found here:
>> 
>> https://wiki.qt.io/Building_Qt_5_from_Git
>> 
>> 
>> The process for cloning and checking out the dev branch goes fine until
>> qtnetworkauth. At that point I am consistently prompted to authenticate,
>> which does not succeed with my GitHub account.
>> 
>> Do I need to be registered anywhere as a user in order to get access? I just
>> want read-only access at this time.
>> 
>> $ git clone https://github.com/qtproject/qt5.git --branch dev
> 
> No registration is required.
> 
> 
> === EXPLANATION ===
> Some time ago, the libraries moved from https://github.com/qtproject/
> to https://github.com/qt/.
> 
> So, https://github.com/qtproject/qt5.git now redirects to
> https://github.com/qt/qt5.git (try it in your web browser). GitHub
> takes care of the redirection when you clone.
> 
> However, Qt Network Authorization is a much newer module. It never
> existed under the old qtproject account, so a redirection doesn't
> exist. You can go to https://github.com/qt/qtnetworkauth.git, but
> https://github.com/qtproject/qtnetworkauth.git gives error 404.
> 
> 
> === SOLUTION ===
> If you edit your the qt5/.git/config file and set remote "origin" to
> https://github.com/qt/qt5.git, you should be able to run the
> init-repository script again. (You might need to use the --force
> option)
> 
> If all that is too hard, you can also delete everything, clone
> https://code.qt.io/qt/qt5.git (as recommended by the wiki), and run
> init-repository from scratch.
> 
> 
>> $ cd qt5
>> $ git checkout dev
>> $ perl init-repository
>> --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
>> 
>> Error message:
>> + git clone --no-checkout https://github.com/qtproject/qtnetworkauth.git
>> qtnetworkauth
>> Cloning into 'qtnetworkauth'...
>> Username for 'https://github.com': 
>> Password for 'https://x...@github.com':
>> remote: Invalid username or password.
>> fatal: Authentication failed for
>> 'https://github.com/qtproject/qtnetworkauth.git/'
>> git clone --no-checkout https://github.com/qtproject/qtnetworkauth.git
>> qtnetworkauth exited with status 32768 at init-repository line 198.
>> Qt::InitRepository::exe('Qt::InitRepository=HASH(0x7f89f2803ff0)', 'git',
>> 'clone', '--no-checkout', 'https://github.com/qtproject/qtnetworkauth.git',
>> 'qtnetworkauth') called at init-repository line 534
>> Qt::InitRepository::git_clone_one_submodule('Qt::InitRepository=HASH(0x7f89f2803ff0)',
>> 'qtnetworkauth', 'qtnetworkauth.git', 0) called at init-repository line 407
>> Qt::InitRepository::git_clone_all_submodules('Qt::InitRepository=HASH(0x7f89f2803ff0)',
>> 'qt5', 0, 'preview', 'essential', 'addon', 'deprecated', '-qtwebkit',
>> '-qtwebkit-examples', ...) called at init-repository line 644
>> Qt::InitRepository::run('Qt::InitRepository=HASH(0x7f89f2803ff0)') called at
>> init-repository line 655
> 
> 
> Regards,
> Sze-Howe


Thanks, that fixed that problem:

> If you edit your the qt5/.git/config file and set remote "origin" to
> https://github.com/qt/qt5.git, you should be able to run the
> init-repository script again. (You might need to use the --force
> option)


Now, another issue has appeared with qtlocation-mapboxgl.git:

+ git config remote.gerrit.url 
ssh://codereview.qt-project.org/qt/qtlocation-mapboxgl.git
+ git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/
+ git submodule update --force --no-fetch
fatal: Needed a single revision
Unable to find current revision in submodule path 
'src/3rdparty/mapbox-gl-native'
git submodule update --force --no-fetch exited with status 256 at 
init-repository line 198.
Qt::InitRepository::exe('Qt::InitRepository=HASH(0x7ffd58802ff0)', 
'git', 'submodule', 'update', '--force', '--no-fetch') called at 
init-repository line 429

Qt::InitRepository::git_clone_all_submodules('Qt::InitRepository=HASH(0x7ffd58802ff0)',
 'qtlocation.git', 0, 'all') called at init-repository line 435

Qt::InitRepository::git_clone_all_submodules('Qt::InitRepository=HASH(0x7ffd58802ff0)',
 'qt5', 0, 'preview', 'essential', 'addon', 'deprecated', '-qtwebkit', 
'-qtwebkit-examples', ...) called at init-repository line 644
Qt::InitRepository::run('Qt::InitRepository=HASH(0x7ffd58802ff0)') 
called at init-repository line 655

Is there a fix for this? Is this documented anywhere?

Thanks very much for your assistance.___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Compiling the latest Qt versions post-5.10

2017-10-22 Thread Jeffrey Brendecke

> On 21. Oct 2017, at 15:56, Jeffrey Brendecke <jeffrey.brende...@gmail.com> 
> wrote:
> 
> Is it possible to access the latest development branches for Qt versions 
> after 5.10?
> 
> If so, where do I get the source and are there compilation/installation 
> instructions beyond what is found here:
> 
> https://wiki.qt.io/Building_Qt_5_from_Git 
> <https://wiki.qt.io/Building_Qt_5_from_Git>
> 

The process for cloning and checking out the dev branch goes fine until 
qtnetworkauth. At that point I am consistently prompted to authenticate, which 
does not succeed with my GitHub account.

Do I need to be registered anywhere as a user in order to get access? I just 
want read-only access at this time.

$ git clone https://github.com/qtproject/qt5.git --branch dev
$ cd qt5
$ git checkout dev
$ perl init-repository 
--module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine

Error message:
+ git clone --no-checkout https://github.com/qtproject/qtnetworkauth.git 
qtnetworkauth
Cloning into 'qtnetworkauth'...
Username for 'https://github.com': 
Password for 'https://x...@github.com': 
remote: Invalid username or password.
fatal: Authentication failed for 
'https://github.com/qtproject/qtnetworkauth.git/'
git clone --no-checkout https://github.com/qtproject/qtnetworkauth.git 
qtnetworkauth exited with status 32768 at init-repository line 198.
Qt::InitRepository::exe('Qt::InitRepository=HASH(0x7f89f2803ff0)', 
'git', 'clone', '--no-checkout', 
'https://github.com/qtproject/qtnetworkauth.git', 'qtnetworkauth') called at 
init-repository line 534

Qt::InitRepository::git_clone_one_submodule('Qt::InitRepository=HASH(0x7f89f2803ff0)',
 'qtnetworkauth', 'qtnetworkauth.git', 0) called at init-repository line 407

Qt::InitRepository::git_clone_all_submodules('Qt::InitRepository=HASH(0x7f89f2803ff0)',
 'qt5', 0, 'preview', 'essential', 'addon', 'deprecated', '-qtwebkit', 
'-qtwebkit-examples', ...) called at init-repository line 644
Qt::InitRepository::run('Qt::InitRepository=HASH(0x7f89f2803ff0)') 
called at init-repository line 655

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


[Interest] Compiling the latest Qt versions post-5.10

2017-10-21 Thread Jeffrey Brendecke
Is it possible to access the latest development branches for Qt versions after 
5.10?

If so, where do I get the source and are there compilation/installation 
instructions beyond what is found here:

https://wiki.qt.io/Building_Qt_5_from_Git 


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


Re: [Interest] Problems with Display of Arabic Text Diacritical Marks

2017-05-21 Thread Jeffrey Brendecke

> On 21 May 2017, at 16:11, Jeffrey Brendecke <jeffrey.brende...@gmail.com> 
> wrote:
> 
> I am working on a cross-platform application with Arabic text and am having 
> problems with diacritical marks not being properly displayed.
> 
> MacOS/iOS:
> Fatha and sukun display too far above the text. Kasra displays so far below 
> the text that it crashes into the next line. This is the case with the 
> default Geeza Pro font (TrueType), which displays great in native 
> applications (e.g., Pages). Using other fonts on MacOS leads to some 
> improvement (e.g., Adobe Arabic (OpenType) looks better though still far from 
> ideal).
> 
> Android:
> Many of the marks display too close to the text if not crash into the letters.
> 
> Linux (Ubuntu 16.04)
> Similar problems as MacOS.
> 
> Windows 10:
> This is the only platform I tried that seems to get it right with display of 
> the Arabic text. All fonts I tried look great.
> 
> My application is Qml-based, but a short test shows that text widgets have 
> the same problem.
> 
> Using renderType: Text.NativeRendering or Text.QtRendering does not make any 
> difference on MacOS/iOS.
> 
> I tried recompiling for MacOS explicitly setting -qt-harfbuzz, with the same 
> results as before. I looked into the code 
> (qt-everywhere-enterprise-src-5.9.0-beta4/qtbase/src/3rdparty/harfbuzz/) , 
> and it appears that there is an old version of harfbuzz in there, at least 
> when compared to what I see in 
> https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.4.6.tar.bz2 
> <https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.4.6.tar.bz2>
>  .
> 
> I found the following bugs that seem to relate to the situation, but there 
> does not seem to be any real movement on them:
> 
> https://bugreports.qt.io/browse/QTBUG-18980 
> <https://bugreports.qt.io/browse/QTBUG-18980>
> https://bugreports.qt.io/browse/QTBUG-33764 
> <https://bugreports.qt.io/browse/QTBUG-33764>
> 
> https://bugreports.qt.io/browse/QTBUG-17728 
> <https://bugreports.qt.io/browse/QTBUG-17728> suggests setting 
> QT_ENABLE_HARFBUZZ on MacOS when running the app. I did this and ran qmlscene 
> on a test qml file, and it made no difference.
> 
> Is there anyway I can work with the situation to get the type to display well?
> 

--

Some additional information:

Qt version: 5.9, beta4 or 5.8 (RTM)

Setting font.hintingPreference to Font.PreferVerticalHinting or 
Font.PreferFullHinting has no effect.

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


[Interest] Problems with Display of Arabic Text Diacritical Marks

2017-05-21 Thread Jeffrey Brendecke
I am working on a cross-platform application with Arabic text and am having 
problems with diacritical marks not being properly displayed.

MacOS/iOS:
Fatha and sukun display too far above the text. Kasra displays so far below the 
text that it crashes into the next line. This is the case with the default 
Geeza Pro font (TrueType), which displays great in native applications (e.g., 
Pages). Using other fonts on MacOS leads to some improvement (e.g., Adobe 
Arabic (OpenType) looks better though still far from ideal).

Android:
Many of the marks display too close to the text if not crash into the letters.

Linux (Ubuntu 16.04)
Similar problems as MacOS.

Windows 10:
This is the only platform I tried that seems to get it right with display of 
the Arabic text. All fonts I tried look great.

My application is Qml-based, but a short test shows that text widgets have the 
same problem.

Using renderType: Text.NativeRendering or Text.QtRendering does not make any 
difference on MacOS/iOS.

I tried recompiling for MacOS explicitly setting -qt-harfbuzz, with the same 
results as before. I looked into the code 
(qt-everywhere-enterprise-src-5.9.0-beta4/qtbase/src/3rdparty/harfbuzz/) , and 
it appears that there is an old version of harfbuzz in there, at least when 
compared to what I see in 
https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.4.6.tar.bz2 
 .

I found the following bugs that seem to relate to the situation, but there does 
not seem to be any real movement on them:

https://bugreports.qt.io/browse/QTBUG-18980 

https://bugreports.qt.io/browse/QTBUG-33764 


https://bugreports.qt.io/browse/QTBUG-17728 
 suggests setting 
QT_ENABLE_HARFBUZZ on MacOS when running the app. I did this and ran qmlscene 
on a test qml file, and it made no difference.

Is there anyway I can work with the situation to get the type to display well?

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