Re: [Development] Qt PDF as a new TP module for Qt 5.14

2019-08-19 Thread Fabrice Salvaire

Dear all,

I implemented PDF rendering in Qt application.
My opinion is that Poppler is not the best piece of open source code, 
look the code in comparison to MuPDF, it is C but clean C and run on 
embedded devices.
Rather Poppler is more like a pile-up of crappy codes.  Some years ago, 
somebody complained that Poppler doesn't use the same rendering engine 
on Gnome and KDE ...
And Okular is nearly unable to print a document, try to print a 10 cm 
square on a printer or to do complex printing, personally I would prefer 
to boot Windows and use Acroread instead.

However I don't have experience with PDFium.

Cheers,

Fabrice

Le 12/08/2019 à 17:16, Thiago Macieira a écrit :

On Monday, 12 August 2019 05:35:06 PDT Kai Köhne wrote:

I suggest to promote Qt PDF to a Qt module. For Qt 5.14, it will be in Tech
Preview state, and Shawn Rutledge is volunteering to be the maintainer.
Although still staying an independent library from the user's perspective,
it will be hosted and built in the qtwebengine.git repository. Initially
only the desktop platforms (Windows, Linux, macOS) would be supported.

Qt PDF is so far a Qt labs module [1]. It allows Qt applications to
render/view PDF's in QWidget based applications [2], and is built on top of
PDFium. However, development has been stagnant, also because it is built on
top of a rather old version of PDFium.

Has any analysis been done comparing the feature and platform support, and
codebase size, for PDFium versus Poppler?

Or is the big problem that the library we need to use (poppler-qt) depend on
Qt itself?



___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


Re: [Development] Technical vision for Qt for Python

2019-08-19 Thread Fabrice Salvaire

Dear all,

I am using PyQt since 10 years now and my points are:

- It is true that missing bindings is a serious issue to use PySide 
actually.

- I noticed PyQt has simpler wrapper code, but I don't investigated more.
- I would dream to have Python instead of JS, but we know how to 
implement a good JS virtual machine, for Python who really knows ???
- I experimented complex issues and I don't know how to debug them : we 
need a good debugging tool to figure out what happen in threads 
signal/slot ...
- A good tutorial : how to wrap your custom C++ classes (  maybe there 
is one ??? )
- I think that something like a white paper " how to make a reactive 
Python/Qt application " would help people to understand GIL issue and 
how to deal with it.
  Because we can make serious applications using Python/Qt and 
competitive with Electron.

- support async and pypy
- A referential of applications that just works ( I could provide 
https://github.com/FabriceSalvaire/book-browser )


Cheers

Le 19/08/2019 à 14:39, Cristián Maureira-Fredes a écrit :

Hello,

After the general discussion of the vision for Qt6,
we wanted to say a few things regarding Qt for Python.


Even though we are talking about a Python module,
the whole development is C and C++ related, and due to
Python's popularity, we have been getting a lot of attention
on Shiboken, the binding generator that we use to expose
our beloved C++ framework to Python.
That's why I felt motivated to write to the main qt mailing list.

A couple of people here has provided us with really nice feedback
regarding the module, and even related to the integration with
QtCreator. We are really thankful for that.


Since the beginning of the project we have seen it as a
complementary project, and never as a competition to the long-standing
performant C++ counterpart, but most importantly as a really nice way
to extend the Qt project community with a whole new set of users.

As you will read on the blog post, there are a couple of aspects from
the C++ point of view that are really useful, like fast prototyping,
exposing existing C++ projects to Python, or even
extend Qt/C++ application with Python.

It will be really nice to know what do you think,
because at the moment we have been mostly community driven,
and many aspects from the C++ expertise on this mailing list
will help us improving Qt for Python.

https://blog.qt.io/blog/2019/08/19/technical-vision-qt-python/

Cheers



___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


[Development] Public Font API and Qml Scene

2018-12-11 Thread Fabrice Salvaire

Dear all,

I am investigating how to reimplement something similar to 
QtGraphicScene on QML.


Actually I made a quick prototype using QPainter API, which offer a 
black box to render a scene texture either on software or on OpenGL.  I 
don't know the drawbacks of this approach but it just works.


However I noted a big issue if I want to implement my own scene painting 
engine using OpenGL (later Vulkan) API. I don't want to have to deal too 
much with fonts since Qt already have the code to do that. Unfortunately 
the public Qt API don't expose such font API if I am right.


Regards,

Fabrice

___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


[Development] Control 2 : Does StackView garbage collect popped items ?

2018-02-23 Thread Fabrice Salvaire

Dear all,

I am experimenting a way to implement a wizard interface featuring a 
next and previous page navigation using QML Control 2.


I tried to achieve this using StackView but I receive the error 
"TypeError: Type error' when I try to access popped items later, for 
example with console.info(popped_item_array)  It looks like a kind of 
garbage collection of the Qt object returned by push and pop.  But I 
could not figure out any explanation of this behaviour on the Qt doc 
https://doc-snapshots.qt.io/qt5-5.11/qml-qtquick-controls2-stackview.html#unwinding-items-via-pop


Note: I hope I am on the right channel for such technical question.

Cheers,

Fabrice


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Using private API for qt-based library

2017-09-26 Thread Fabrice Salvaire

Le 25/09/2017 à 10:56, Viktor Engelmann a écrit :


On 25.09.2017 10:29, iman ahmadvand wrote:

Hi every one.
I'm developing a set of specialized opensource widgets in c++ (called 
MaterialWidgets which is google material design implementation)
Now i want to use private API for this library to prevent re 
implementing a bunch of logics behind those widgets.


What is your suggestion ?

don't


Sure, but in some particular cases, we have no choice when Qt don't 
expose the API



As this lib depends on Qt, is it a bad idea to use private parts ?
Do you have other good design practice for me ?

For a showcase 
 i 
need to access 
QAbstractScrollAreaPrivate::scrollBarContainers->layout and remove 
scrollbars fromQAbstractScrollArea::viewport in my implementation.

Regards.

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


--

Viktor Engelmann
Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
viktor.engelm...@qt.io
+49 151 26784521
http://qt.io

Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B

The Future is Written with Qt
www.qtworldsummit.com


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development



___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] How to add OpenSSL support on Qt Android?

2016-06-15 Thread Fabrice Salvaire

Dear All,

I tried to follow http://doc.qt.io/qt-5/opensslsupport.html but I 
couldn't succeed to have https working on Android.


It seems this note is not up to date for 5.6 and later.

Apparently Qt configure disables the OpenSSL Qt code due to the 
cross-compilation environment and if I try to force the OpenSSL library 
using the options I get a conflict with boringssl from webengine.


I believe most devices have an openssl system library as on Linux (which 
should be boringssl on Android ?). Thus it should be just a 
configuration/cross-compilation issue.


That is quite annoying since https is mandatory for some network services.

Sincerely yours,

Fabrice


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Bluetooth Services problem

2016-05-15 Thread Fabrice Salvaire

Hi,

Indeed bluetooth is broken.
Best would be to provide information for QTBUG-52277 


I don't have time to investigate on it actually.

Fabrice

Le 05/05/2016 à 08:34, Matías Néstor Ares a écrit :

Hi Everybody!!

I'm having an issue with bluetooth on QML on android  Qt 5.6.0
I can't even fully test the example:
http://doc.qt.io/qt-5/qtbluetooth-scanner-example.html

trying to access service inside onServiceDiscovered: it gets undefined.


as documentation says : *serviceDiscovered(BluetoothService service)
* serviceDiscovered parameter is "service" but it is undefined...

is it a bug? is there some workaround?

Thanks in advance.

Best regards


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development



___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Though about rich text (html, WebView) rendering

2016-02-26 Thread Fabrice Salvaire

Hi Kai,

Le 26/02/2016 11:15, Koehne Kai a écrit :



-Original Message-
From: Development [mailto:development-
bounces+kai.koehne=theqtcompany@qt-project.org] On Behalf Of
Fabrice Salvaire
Sent: Thursday, February 25, 2016 1:33 PM
To: development@qt-project.org
Subject: [Development] Though about rich text (html, WebView) rendering

Dear all,

I am investigating to port a content server to an off-line mobile application
in order to don't rely to a network connection at all. Thus I have to port a
database, a kind of web framework, a template engine and a rendering
engine. I believe it can be a use of case of Qt on mobile platform.

If we consider HTML is the right way to display rich text there is actually to
solution with Qt : Text for basic HTML and WebView for a full compliance. I
am not sure to understand why we cannot use WebEngine on mobile
platform. WebEngine seems more interesting since it provides WebChannel
hooks.

Let's be clear here on the terminology: With "WebView" I assume you refer
to Qt WebView (http://doc.qt.io/qt-5/qtwebview-index.html), which on Android
integrates the native browser. Since Qt WebChannel can use WebSockets as
a means of communciation, you can use it with Qt WebView on Android, too.
You'd need to set up a local websocket server though ("ws://localhost/...").
Not sure how exactly that works for an Android app.


Ok, I could investigate this.



Qt WebEngine is indeed currently only supported for Windows, OS X and
Linux. Porting it to Android is possible, but a lot of work.


Thus android and ios don't forbid it.


I succeed to hack the WebView using the loadingChanged signal in order to
simulate a dynamic HTML framework, i.e. call loadHtml according to the url.
But I don't known if it is the right way to achieve this. Maybe we can extend
the Java wrapper for this purpose? The fact the rendering surface is a light
web browser behind the scene can be disturbing since it doesn't integrate
very well with the QML application.

I'm not sure I really understood what you've been doing with the loadingChanged
Signal.


What I did basically to catch page loading and set the content according 
to the url ( WebView get page -> LoadingChanged signal -> call loadHtml 
-> ... ) :


function handle_loading(load_request) {
if (load_request.url == "qrc:/index.html" && 
load_request.status == 0) {
var html_content = "Main Pagehref=\"page1\">A link";

}
if (load_request.url == "qrc:/page1" && load_request.status == 0) {
var html_content = "Basic HTML";
}
var base_url = "qrc:/";
web_view.loadHtml(html_content, base_url)
}

WebView {
id: web_view
objectName: "web_view"
anchors.fill: parent
url: "qrc:/index.html"
onLoadingChanged: handle_loading(loadRequest)
}


I think there is something evil since a Web engine is a concurrent of QML.

What do you mean by that?


I am just thinking how to implement the power of HTML for text rendering 
in QML cleverly. And don't use any web framework for mobile platform.


Mathjax is a good example. How can we implement a computer algebra 
system //using Qt for example ?


  

We can render math formulas out of the box using a QML WebView and
mathjax, but we can also implement a full application using HTML5 and
javascript. Thus use a stack over a stack ...

What is the future plan and advices for this topic?

I'm afraid there are no direct plans to support Qt WebEngine on Android.
If I'd be you I'd try to set up a WebSocket. If that ain't possible you could
Still try to communicate between the WebView and your app
just via runJavaScript().

Regards

Kai


Fabrice
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Though about rich text (html, WebView) rendering

2016-02-25 Thread Fabrice Salvaire

Dear all,

I am investigating to port a content server to an off-line mobile 
application in order to don't rely to a network connection at all. Thus 
I have to port a database, a kind of web framework, a template engine 
and a rendering engine. I believe it can be a use of case of Qt on 
mobile platform.


If we consider HTML is the right way to display rich text there is 
actually to solution with Qt : Text for basic HTML and WebView for a 
full compliance. I am not sure to understand why we cannot use WebEngine 
on mobile platform. WebEngine seems more interesting since it provides 
WebChannel hooks.


I succeed to hack the WebView using the loadingChanged signal in order 
to simulate a dynamic HTML framework, i.e. call loadHtml according to 
the url. But I don't known if it is the right way to achieve this. Maybe 
we can extend the Java wrapper for this purpose? The fact the rendering 
surface is a light web browser behind the scene can be disturbing since 
it doesn't integrate very well with the QML application.


I think there is something evil since a Web engine is a concurrent of 
QML. We can render math formulas out of the box using a QML WebView and 
mathjax, but we can also implement a full application using HTML5 and 
javascript. Thus use a stack over a stack ...


What is the future plan and advices for this topic?

Fabrice

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development