QScintilla problems.

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

QScintilla problems.

Barry Scott


The attached code shows two problems with QScintilla.

1. SCI_STYLEGETFONT does not return the font.
2. Changing the size to 24pt makes line spacing be 24pt but the text is drawn in 11pt.

(1) looks likes a bug.
(2) may be that I do not understand something about how to drive the API.
What makes Scintilla use the changed settings.

(3) Changing the font does not seem to work either.

What am I misunderstanding?

Barry




_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

qsci_bug.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: QScintilla problems.

Barry Scott
I ran this on macOS python 3.7 with latest PyQt5 ans QSintilla.

Barry

> On 18 Aug 2019, at 19:30, Barry Scott <[hidden email]> wrote:
>
> <qsci_bug.py>
>
>
> The attached code shows two problems with QScintilla.
>
> 1. SCI_STYLEGETFONT does not return the font.
> 2. Changing the size to 24pt makes line spacing be 24pt but the text is drawn in 11pt.
>
> (1) looks likes a bug.
> (2) may be that I do not understand something about how to drive the API.
> What makes Scintilla use the changed settings.
>
> (3) Changing the font does not seem to work either.
>
> What am I misunderstanding?
>
> Barry
>
>
>
> _______________________________________________
> PyQt mailing list    [hidden email]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

PyQt license

kristof.mulier
In reply to this post by Barry Scott
Dear PyQt developers,

We're a team of 3 people (Johan Cockx, Matic Kukovec and Kristof Mulier) working on a startup: a new IDE for microcontrollers. We're using PyQt for the graphical user interface and QScintilla for the editor. Our software will be distributed for free (although we won't make it open-source).

We have to buy a PyQt license before launching the software. However, could you consider giving us a discount? Please keep in mind:

1. We're a startup and are currently paying everything from our own savings.

2. We've built the website https://qscintilla.com which contains very detailed documentation on how to use QScintilla, and we're paying monthly for keeping this website online on a server. It's our way to give something back to the community.

Kind greetings,

Kristof Mulier

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

Phil Thompson-5
On 20/08/2019 10:02, [hidden email] wrote:

> Dear PyQt developers,
>
> We're a team of 3 people (Johan Cockx, Matic Kukovec and Kristof
> Mulier) working on a startup: a new IDE for microcontrollers. We're
> using PyQt for the graphical user interface and QScintilla for the
> editor. Our software will be distributed for free (although we won't
> make it open-source).
>
> We have to buy a PyQt license before launching the software. However,
> could you consider giving us a discount?

I'm sorry we do not give discounts to anybody.

Regards,
Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

kristof.mulier
Hi Phil,

Before denying a discount, could you please check with some of your coworkers? I believe we have a decent reason to apply for a discount: we've developed the website https://qscintilla.com with a lot of documentation. We're the first to provide decent documentation on how to use QScintilla. Many people use our website to develop applications with QScintilla, so it's certainly benefiting your company Riverbank Computing. We did all of this for free.

Please give it a second thought.

Kind greetings,

Kristof



----- Oorspronkelijk bericht -----
Van: "phil" <[hidden email]>
Aan: "kristof mulier" <[hidden email]>
Cc: "pyqt" <[hidden email]>, "Barry Scott" <[hidden email]>, "info" <[hidden email]>, "johan cockx" <[hidden email]>, "kukovecmatic" <[hidden email]>
Verzonden: Dinsdag 20 augustus 2019 11:05:28
Onderwerp: Re: PyQt license

On 20/08/2019 10:02, [hidden email] wrote:

> Dear PyQt developers,
>
> We're a team of 3 people (Johan Cockx, Matic Kukovec and Kristof
> Mulier) working on a startup: a new IDE for microcontrollers. We're
> using PyQt for the graphical user interface and QScintilla for the
> editor. Our software will be distributed for free (although we won't
> make it open-source).
>
> We have to buy a PyQt license before launching the software. However,
> could you consider giving us a discount?

I'm sorry we do not give discounts to anybody.

Regards,
Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

V. Armando Solé
In reply to this post by kristof.mulier
On 20/08/2019 11:02, [hidden email] wrote:
> Dear PyQt developers,
>
> We're a team of 3 people (Johan Cockx, Matic Kukovec and Kristof Mulier) working on a startup: a new IDE for microcontrollers. We're using PyQt for the graphical user interface and QScintilla for the editor. Our software will be distributed for free (although we won't make it open-source).

If you do not intend to make money with the software, have you
considered obfuscating your code?

Just an example of what your open source could look like
http://pyob.oxyry.com/

Armando


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

Daniel Trstenjak-2
On Tue, Aug 20, 2019 at 11:31:03AM +0200, V. Armando Solé wrote:
> If you do not intend to make money with the software, have you
> considered obfuscating your code?

I don't think that the GPL allows this, because it would go
pretty much against the idea of the GPL.

Greetings,
Daniel
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

V. Armando Solé
On 20/08/2019 11:49, Daniel Trstenjak wrote:
> On Tue, Aug 20, 2019 at 11:31:03AM +0200, V. Armando Solé wrote:
>> If you do not intend to make money with the software, have you
>> considered obfuscating your code?
> I don't think that the GPL allows this, because it would go
> pretty much against the idea of the GPL.

Indeed clause 3:

The source code for a work means the preferred form of the work for
making modifications to it.

Armando



_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

V. Armando Solé
In reply to this post by Daniel Trstenjak-2
On 20/08/2019 11:49, Daniel Trstenjak wrote:
> On Tue, Aug 20, 2019 at 11:31:03AM +0200, V. Armando Solé wrote:
>> If you do not intend to make money with the software, have you
>> considered obfuscating your code?
> I don't think that the GPL allows this, because it would go
> pretty much against the idea of the GPL.
>
You are right. GPL clause 3:

The source code for a work means the preferred form of the work for
making modifications to it.

Armando


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
BPL
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

BPL
In reply to this post by kristof.mulier
Kristof,

I'm curious, when you say you won't make it open-source, which method of deployment & distribution you guys are picking up? Asking as your choices in this regard are very limited in python land. If you decided to use any of the existing freezers {bbFreeze, py2exe, pyInstaller, cx_Freeze, py2app} your code would be very easy to unpack. The only choice I know that could bring you enough "protection" are either nuitka(mature enough) or beeware(not ready to use on production).

Also, there is pyqtdeploy although I don't know which packing method uses behind the curtains... so not sure how easy would be to break/unpack.

On Tue, Aug 20, 2019 at 11:04 AM <[hidden email]> wrote:
Dear PyQt developers,

We're a team of 3 people (Johan Cockx, Matic Kukovec and Kristof Mulier) working on a startup: a new IDE for microcontrollers. We're using PyQt for the graphical user interface and QScintilla for the editor. Our software will be distributed for free (although we won't make it open-source).

We have to buy a PyQt license before launching the software. However, could you consider giving us a discount? Please keep in mind:

1. We're a startup and are currently paying everything from our own savings.

2. We've built the website https://qscintilla.com which contains very detailed documentation on how to use QScintilla, and we're paying monthly for keeping this website online on a server. It's our way to give something back to the community.

Kind greetings,

Kristof Mulier

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

Kyle Altendorf


On August 20, 2019 6:29:21 AM EDT, BPL <[hidden email]> wrote:

>Kristof,
>
>I'm curious, when you say you won't make it open-source, which method
>of
>deployment & distribution you guys are picking up? Asking as your
>choices
>in this regard are very limited in python land. If you decided to use
>any of the existing freezers {bbFreeze, py2exe, pyInstaller, cx_Freeze,
>py2app} your code would be very easy to unpack. The only choice I know
>that
>could bring you enough "protection" are either nuitka(mature enough) or
>beeware(not ready to use on production).

DRM doesn't really work.  You are giving the user the code to execute, they have it.  Licenses are there to allow legal action, not technical action.  If you are prepared to take legal action then obfuscation isn't particularly relevant.  If you aren't prepared to take legal action then obfuscation isn't particularly relevant.  The simple fact that PyQt itself is dual licensed should make this clear.

I am a little curious though.  What part of the IDE is useful to be proprietary but still distributed for free?  How will it be leveraged to make money etc.

Cheers,
-kyle
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

kristof.mulier
Hi @Kyle and @BPL,

We 'compile' the .py files into .pyd files with Cython. Then we freeze them together.
To be honest, I'm not into all the details, because Matic is taking care of the
packaging.

The IDE we're making is developed from scratch and focused on microcontrollers only (so it's not a general purpose IDE). Our business model is:
 - Offer support (for an hourly rate).
 - Charge microcontroller vebdors (STMicroelectronics, Texas Instruments, ...) to support their chips.

To charge the microcontroller vendors, we got to have a large user base first. Otherwise they'll never take us serious. We want to keep the IDE free for all users (also commercial users) and will try to get our income through other means (like the microcontroller vendors, paid support, ...). We also got to eat, you see ^_^

If you want, send a mail to [hidden email] , so we'll keep you updated about the launch.
Soon we'll turn our name into "Embeetle", but for now, you got to mail to "EmbedOffice".

Kind greetings,

Kristof Mulier



----- Oorspronkelijk bericht -----
Van: "Kyle Altendorf" <[hidden email]>
Aan: "pyqt" <[hidden email]>, "BPL" <[hidden email]>, "kristof mulier" <[hidden email]>
Verzonden: Dinsdag 20 augustus 2019 13:50:20
Onderwerp: Re: [PyQt] PyQt license

On August 20, 2019 6:29:21 AM EDT, BPL <[hidden email]> wrote:

>Kristof,
>
>I'm curious, when you say you won't make it open-source, which method
>of
>deployment & distribution you guys are picking up? Asking as your
>choices
>in this regard are very limited in python land. If you decided to use
>any of the existing freezers {bbFreeze, py2exe, pyInstaller, cx_Freeze,
>py2app} your code would be very easy to unpack. The only choice I know
>that
>could bring you enough "protection" are either nuitka(mature enough) or
>beeware(not ready to use on production).

DRM doesn't really work.  You are giving the user the code to execute, they have it.  Licenses are there to allow legal action, not technical action.  If you are prepared to take legal action then obfuscation isn't particularly relevant.  If you aren't prepared to take legal action then obfuscation isn't particularly relevant.  The simple fact that PyQt itself is dual licensed should make this clear.

I am a little curious though.  What part of the IDE is useful to be proprietary but still distributed for free?  How will it be leveraged to make money etc.

Cheers,
-kyle
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: QScintilla problems.

Colin McPhail-3
In reply to this post by Barry Scott


> On 18 Aug 2019, at 19:30, Barry Scott <[hidden email]> wrote:
>
>
>
> The attached code shows two problems with QScintilla.
>
> 1. SCI_STYLEGETFONT does not return the font.
> 2. Changing the size to 24pt makes line spacing be 24pt but the text is drawn in 11pt.
>
> (1) looks likes a bug.
> (2) may be that I do not understand something about how to drive the API.
> What makes Scintilla use the changed settings.
>
> (3) Changing the font does not seem to work either.
>
> What am I misunderstanding?
>
> Barry
I'm not a QScintilla expert but I imagine most people use the convenience methods of QScintilla objects such as setFont() and setText(). I've attached a version of your example code that uses those methods.

Coiin


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

qsci_bug_2.py (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PyQt license

Barry Scott
In reply to this post by kristof.mulier
You have hijacked my email thread. Please do not do this. Start you own email thread.

Barry

> On 20 Aug 2019, at 10:02, [hidden email] wrote:
>
> Dear PyQt developers,
>
> We're a team of 3 people (Johan Cockx, Matic Kukovec and Kristof Mulier) working on a startup: a new IDE for microcontrollers. We're using PyQt for the graphical user interface and QScintilla for the editor. Our software will be distributed for free (although we won't make it open-source).
>
> We have to buy a PyQt license before launching the software. However, could you consider giving us a discount? Please keep in mind:
>
> 1. We're a startup and are currently paying everything from our own savings.
>
> 2. We've built the website https://qscintilla.com which contains very detailed documentation on how to use QScintilla, and we're paying monthly for keeping this website online on a server. It's our way to give something back to the community.
>
> Kind greetings,
>
> Kristof Mulier
>
> _______________________________________________
> PyQt mailing list    [hidden email]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: QScintilla problems.

Phil Thompson-5
In reply to this post by Colin McPhail-3
On 20/08/2019 15:05, Colin McPhail wrote:

>> On 18 Aug 2019, at 19:30, Barry Scott <[hidden email]> wrote:
>>
>>
>>
>> The attached code shows two problems with QScintilla.
>>
>> 1. SCI_STYLEGETFONT does not return the font.
>> 2. Changing the size to 24pt makes line spacing be 24pt but the text
>> is drawn in 11pt.
>>
>> (1) looks likes a bug.
>> (2) may be that I do not understand something about how to drive the
>> API.
>> What makes Scintilla use the changed settings.
>>
>> (3) Changing the font does not seem to work either.
>>
>> What am I misunderstanding?
>>
>> Barry
>
> I'm not a QScintilla expert but I imagine most people use the
> convenience methods of QScintilla objects such as setFont() and
> setText(). I've attached a version of your example code that uses
> those methods.

Yes - the main purpose of the low-level API is to support the needs of
the high-level API. It should only need to be used if there is some
feature of Scintilla that hasn't got a higher level abstraction.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: QScintilla problems.

Barry Scott


On 20 Aug 2019, at 18:49, Phil Thompson <[hidden email]> wrote:

On 20/08/2019 15:05, Colin McPhail wrote:
On 18 Aug 2019, at 19:30, Barry Scott <[hidden email]> wrote:
The attached code shows two problems with QScintilla.
1. SCI_STYLEGETFONT does not return the font.
2. Changing the size to 24pt makes line spacing be 24pt but the text is drawn in 11pt.
(1) looks likes a bug.
(2) may be that I do not understand something about how to drive the API.
What makes Scintilla use the changed settings.
(3) Changing the font does not seem to work either.
What am I misunderstanding?
Barry
I'm not a QScintilla expert but I imagine most people use the
convenience methods of QScintilla objects such as setFont() and
setText(). I've attached a version of your example code that uses
those methods.

Yes - the main purpose of the low-level API is to support the needs of the high-level API. It should only need to be used if there is some feature of Scintilla that hasn't got a higher level abstraction.

Using setFont() has got my code working again. Original code is 3 years old and only broke recently.

The reason I was using the low level API is that the high level API does not support my
use case, as far as I can tell.

I'm using Qscintilla to make a side-by-side diff tool. I colour text to make it easy to see
inserted, deleted and modified text. This I do by using SCI_STYLESETFORE and
SCI_STYLESETBACK for 4 style numbers.

I use STYLE_DEFAULT, STYLE_LASTPREDEFINED+1, STYLE_LASTPREDEFINED+2
and STYLE_LASTPREDEFINED+3.

I'm also using INDIC and folding via the low level API.

BTW the PyPi description page has a bad link to the docs of


Barry




Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt