Re: [Interest] Why is this a binding loop?

2016-11-15 Thread Nuno Santos
Binding loops sucks, but with some refactoring we always get to an alternative.

Try this:

Rectangle {
width: parent.width
height: label.paintedHeight*2

Text {
id: label
text: “title
anchors.centerIn: parent
}
}

If the binding loops persists maybe the dependency is being caused by 
anchors.centerIn: parent

Nuno

> On 16 Nov 2016, at 07:41, Elvis Stansvik  wrote:
> 
> Den 15 nov. 2016 11:15 em skrev "Jason H"  >:
> >
> > Rectangle {
> > width: parent.width
> > height: childrenRect.height * 2
> > Text {
> > text: "title"
> > anchors.centerIn: parent
> > }
> > }
> >
> > 'QML Rectangle: Binding loop detected for property "height"'
> >
> > I think that computation should be possible without creating a binding loop?
> 
> I would think so too, but perhaps there's a limitation such that when you use 
> childrenRect in the height expression, a dependency on that property group as 
> a whole (including x and y, which are in turn dependent on the parent height, 
> thus creating a "false" loop) is introduced.
> 
> Though I don't know, that seems like a serious limitation to me, so I'm 
> probably wrong. Just an idea.
> 
> Does it work if you give the Text an id, and use the Text's height explicitly 
> instead of childrenRect.height? (on the bus, so can't test).
> 
> Elvis
> 
> > ___
> > 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

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


Re: [Interest] Why is this a binding loop?

2016-11-15 Thread Elvis Stansvik
Den 15 nov. 2016 11:15 em skrev "Jason H" :
>
> Rectangle {
> width: parent.width
> height: childrenRect.height * 2
> Text {
> text: "title"
> anchors.centerIn: parent
> }
> }
>
> 'QML Rectangle: Binding loop detected for property "height"'
>
> I think that computation should be possible without creating a binding
loop?

I would think so too, but perhaps there's a limitation such that when you
use childrenRect in the height expression, a dependency on that property
group as a whole (including x and y, which are in turn dependent on the
parent height, thus creating a "false" loop) is introduced.

Though I don't know, that seems like a serious limitation to me, so I'm
probably wrong. Just an idea.

Does it work if you give the Text an id, and use the Text's height
explicitly instead of childrenRect.height? (on the bus, so can't test).

Elvis

> ___
> 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] Send an email with attachment

2016-11-15 Thread Charles-Élie G
Yes it's me :-)
I just hope to find another solution here. ;-)


Envoyé de mon Galaxy S6 Orange
 Message d'origine De : Konstantin Shegunov 
 Date : 16/11/2016  07:34  (GMT+01:00) À : Charles-Elie 
Gentil  Cc : Interests Qt  Objet : 
Re: [Interest] Send an email with attachment 
On Wed, Nov 16, 2016 at 8:01 AM, Charles-Elie Gentil  
wrote:Since my application, I want to send an email with an attachment. I know 
this is impossible with "mailto".
For reference, here's what had been discussed in the forum: 
https://forum.qt.io/topic/73307/send-an-email-with-attachment
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Send an email with attachment

2016-11-15 Thread Konstantin Shegunov
On Wed, Nov 16, 2016 at 8:01 AM, Charles-Elie Gentil 
wrote:
>
> Since my application, I want to send an email with an attachment. I know
> this is impossible with "mailto".
>

For reference, here's what had been discussed in the forum:
https://forum.qt.io/topic/73307/send-an-email-with-attachment
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Send an email with attachment

2016-11-15 Thread Charles-Elie Gentil
Hello,


Since my application, I want to send an email with an attachment. I know this 
is impossible with "mailto". In fact, I would like to do like the "Send by 
mail" options of Word, LibreOffice or Calligra. So I looked at the Calligra 
source code and it seems to use the ShellExecuteW command (in 
KToolInvocation::invokMailer), but I can not make it work.

Do you think it's possible to do the same for the desktop version of my 
application (MacOS, Win)? For Android, I think using Qt Android Extra. Or 
create a .eml ou .msg file, ready to send ?

What do you think ?

Thank you in advance for your help.

Best regards,

Charlie

m...@jiyuusoft.net
http://blog.jiyuusoft.net

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


Re: [Interest] The Android virtual keyboard pushes my main window off the screen

2016-11-15 Thread Nikos Chantziaras

On 11/14/2016 08:51 PM, Jason H wrote:


How can I keep that from happening? The application becomes useless
if you can't see it on the screen :-/ It seems there's something I
need to do when the device changes orientation? But I don't know
what.


I'm having similar, but different issues. I'm going to have to get
back to you. I've got a release coming up, but maybe others can chime
in with their keyboard experiences??


Alright. I did lots of experimenting with this, and I think the issue is 
that you can't call qApp->inputMethod()->show() from wherever you want. 
In my case, the call has to come from the widget that deals with output, 
not from the widget that deals with input.


In my case, I have a custom QScrollArea widget which implements the 
input. It manages a custom QWidget which does the painting. When I moved 
the qApp->inputMethod()->show() call to the painter widget, the problem 
was fixed.


I have no idea why that is though.

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


Re: [Interest] What don't you like about Qt?

2016-11-15 Thread Jean-Michaël Celerier
On Tue, Nov 15, 2016 at 12:32 PM, Roland Hughes  wrote:

> This was old school grind it out trouble shooting which is not allowed
> under Agile.


My two cents: "$FOO is not allowed" *screams* "not agile".
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Why is this a binding loop?

2016-11-15 Thread Jason H
Rectangle {
width: parent.width
height: childrenRect.height * 2
Text {
text: "title"
anchors.centerIn: parent
}
}

'QML Rectangle: Binding loop detected for property "height"'

I think that computation should be possible without creating a binding loop?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMenu size

2016-11-15 Thread Joshua Grauman

Bo,

Thanks! These are great ideas. It's not about making it work like another 
system, but it is a unique requirement having to do with recording the 
screen...


If you don't mind, could you clarify a bit what you mean with a couple of 
your suggestions?



- Work with the width for height tricks


What does this mean?

- You can move the menu after it appears with either a reimplementation in 
the resizeEvent, eventFilter on resize or other events, or using 0 time 
single shot timer


I understand the first two of these, but where would I implement a 0 time 
single shot?


Thanks again so much!!!

Josh

On Tue, 15 Nov 2016, Bo Thorsen wrote:


Den 08-11-2016 kl. 23:05 skrev Joshua Grauman:

 Hello all,

 I am wondering if there is a way to customize the size of a QMenu used
 as a context menu. I have it so that when I right click, a popup menu
 comes up. But I would like it so the QMenu doesn't ever go outside of
 the window it is clicked in. Right now, if you click near the bottom,
 the QMenu drops below my app. Or if I have a QMenu with a lot of items,
 it breaks it up into two columns worth of items, is there a way to make
 that more (for a wider and less tall sub-QMenu)? Thanks for any thoughts.


This sounds to me like you are trying to force Qt to do something that some 
other system used to do?


I have a lot of requests from customers and I always try to make them accept 
that the default way of doing things are there for a number of reasons and 
they should accept it the it is. So, my advice is to stop thinking about 
this. Or make the guy deciding this stop thinking about it :)


However, if you can't do that, you always have options. Here are a set of 
some of the things I would try:


- Set the maximum height on the QMenu

- Work with the width for height tricks

- You can move the menu after it appears with either a reimplementation in 
the resizeEvent, eventFilter on resize or other events, or using 0 time 
single shot timer


- There are probably a bunch of possible hacks that might work in the area of 
proxy QStyle subclasses


I hope this helps.

Bo Thorsen,
Director, Viking Software.

--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
___
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] Issue compiling qt 5.6.2

2016-11-15 Thread Etienne Sandré-Chardonnal
Done!

Bug tracker link : https://bugreports.qt.io/browse/QTBUG-57148

2016-10-31 8:32 GMT+01:00 Kai Koehne :

> Please file a bug about this. Also include the full build log (or at least
> the part
> of the log that makes it obvious in which module/directory the build
> fails).
>
> Regards
>
> Kai
>
> > -Original Message-
> > From: Interest [mailto:interest-bounces+kai.koehne=qt...@qt-project.org]
> > On Behalf Of Etienne Sandré-Chardonnal
> > Sent: Friday, October 28, 2016 9:51 PM
> > To: interest@qt-project.org
> > Subject: Re: [Interest] Issue compiling qt 5.6.2
> >
> > In fact, building without -j also fails on the same error, after 10
> minutes
> > instead of 1 second. The problem is still there.
> >
> >
> > 2016-10-28 21:38 GMT+02:00 Etienne Sandré-Chardonnal
> >  >:
> >
> >
> >   I forgot to mention, I'm using mingw-w64 under windows.
> >
> >
> >   After more tests, the build fails only when the multi-thread -j
> option
> > is used. I have tried with both mingw32-make and jom, the result is the
> > same. With no -j option (and single thread build), everything works.
> Building
> > qt will take a lonnng time...
> >
> >
> >   Is this a make bug??
> >
> >
> >   Thanks
> >
> >
> >   2016-10-28 21:23 GMT+02:00 Etienne Sandré-Chardonnal
> >  >:
> >
> >
> >   Dear all,
> >
> >
> >   I'm trying to switch from Qt 5.6.1 to 5.6.2, using the same
> > exact command line to configure and compile.
> >
> >
> >   configure works and properly detects system-png (I need to
> > compile agains my own libpng)
> >
> >
> >   but building ends very quickly on "ERROR : libpng
> > development package not found"
> >
> >
> >   The build works with 5.6.1 but not 5.6.2, and googling for
> this
> > error gives no answer. Also, the error message is not very clear, I'm
> not sure
> > which file is not found.
> >
> >
> >   Thanks in advance!
> >
> >
> >   Regards
> >
> >
> >
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QMenu size

2016-11-15 Thread Bo Thorsen

Den 08-11-2016 kl. 23:05 skrev Joshua Grauman:

Hello all,

I am wondering if there is a way to customize the size of a QMenu used
as a context menu. I have it so that when I right click, a popup menu
comes up. But I would like it so the QMenu doesn't ever go outside of
the window it is clicked in. Right now, if you click near the bottom,
the QMenu drops below my app. Or if I have a QMenu with a lot of items,
it breaks it up into two columns worth of items, is there a way to make
that more (for a wider and less tall sub-QMenu)? Thanks for any thoughts.


This sounds to me like you are trying to force Qt to do something that 
some other system used to do?


I have a lot of requests from customers and I always try to make them 
accept that the default way of doing things are there for a number of 
reasons and they should accept it the it is. So, my advice is to stop 
thinking about this. Or make the guy deciding this stop thinking about it :)


However, if you can't do that, you always have options. Here are a set 
of some of the things I would try:


- Set the maximum height on the QMenu

- Work with the width for height tricks

- You can move the menu after it appears with either a reimplementation 
in the resizeEvent, eventFilter on resize or other events, or using 0 
time single shot timer


- There are probably a bunch of possible hacks that might work in the 
area of proxy QStyle subclasses


I hope this helps.

Bo Thorsen,
Director, Viking Software.

--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] What don't you like about Qt?

2016-11-15 Thread Roland Hughes

This would be the second 2 fatal flaws with Agile.

Developer's choice

1 and done mentality/management. Actually that is better than some of 
the Agile groups at equipment manufacturers, some of them demand their 
developers commit 3 completed stories per day.


Big ugly Ogre on steroids type bugs don't get fixed, they simply rot 
until the product/company goes away. Moral is high but product quality 
is low.


On my current project, counting by the calendar, various team members, 
myself included, have put in over 1 month tracking down a memory leak 
problem. Each of us have found various parts of it, but there was 
nothing Agile about it. This was old school grind it out trouble 
shooting which is not allowed under Agile. Valgrind was near useless 
because it slowed the target down enough to require nearly a full 
overnight run but with Valgrind and the app running you ran out of 
memory within a few hours.


We may well have found the last piece of it on Friday, but, it will take 
some time to be sure. Grinding through the code by hand is a chore, 
especially when the project has north of 1 million lines and is growing 
daily.


---

Sorry for any discontinuity here. Started this reply many weeks ago, but 
have been heads down in the typical Agile catastrophe, no time to 
respond. Well, no time until now. Finally gave up and left the project.


No project started with Agile can ever be saved. Period!

Rather than continue this discussion here I'm going to dust off a title 
I hadn't scheduled for completion until 2019. I had done bits and pieces 
on it but this conversation has told me it is definitely time to finish 
and release it.


The T-Shirt was right.

http://www.zazzle.com/careful_or_youll_end_up_in_my_novel_t_shirt-235587332634897053

"The Phallus of Agile and Other Ruminations"  ISBN 978-0-9823580-9-2


On 10/04/2016 06:31 PM, interest-requ...@qt-project.org wrote:

There isn't, because developer selects the bugs they're going to fix. There's
common procedure.

My procedure is: I'll fix everything that is assigned to me, the moment it's
assigned, if I can. If I couldn't within one day, I won't be able to until
there's more information posted.


--
Roland Hughes, President
Logikal Solutions
(630)-205-1593

http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com
http://www.logikalblog.com
http://www.interestingauthors.com/blog

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


Re: [Interest] [5.8] how to use qml caching?

2016-11-15 Thread Tim Blechmann
>> * is it possible to warm up the cache explicitly without
>> instantiating the qml files completely? e.g. i'd like to create the
>> cache for all qml files that will be instantiated during the
>> lifetime of the program at startup time in order to hide latencies
>> when they are actually loaded.
>> 
> No its not possible yet.  As I wrote "Ahead of time compilation of Qt
> Quick continues to be supported through the commercial Qt Quick
> Compiler.“ The main problem to solve is cross platform ahead of time
> compilation.

unfortunately the qtquick compiler isn't included into the
qt-everywhere-enterprise-src tarball, which makes things a bit difficult
to use when compiling qt from sources :/


> If you are on the same kind of machine for building and
> running your application,you could write your own training code by
> instantiating your qml components one after another and collect the
> cache files for later use. But it is not supported yet afaik.

thanks a lot for all the answers, now i know more than before!

cheers,
tim

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


Re: [Interest] [5.8] how to use qml caching?

2016-11-15 Thread Gunnar Roth
Hi Tm.

> so, just to rephrase this with my own words:
> 
> * .qmlc and .jsc are not generated at compile-time and not shipped
> inside the qrc file, but are created at run-time
Yes
> 
> * instead they are created when running the application for the first time.
> 
Yes
> * it does not improve the instantiation times of the first execution, as
> the cache hasn't been warmed up, yet.
> 
Yes
> 
> which leads me to more questions:
> 
> * is there a way to configure the location where the cached files will
> be stored?
> 
My assumption is it is stored in QStandardPaths::CacheLocation, don’t know how 
to influence that yet.

> * is it possible to warm up the cache explicitly without instantiating
> the qml files completely? e.g. i'd like to create the cache for all qml
> files that will be instantiated during the lifetime of the program at
> startup time in order to hide latencies when they are actually loaded.
> 
No its not possible yet.  As I wrote "Ahead of time compilation of Qt Quick 
continues to be supported through the commercial Qt Quick Compiler.“
The main problem to solve is cross platform ahead of time compilation. If you 
are on the same kind of machine for building and running your application,you 
could write your own training code by instantiating your qml components one 
after another and collect the cache files for later use. But it is not 
supported yet afaik.


> thanks a lot,
> tim
> 
>> 
>> Regards,
>> Gunnar Roth
>> 
>> 
>>> Am 14.11.2016 um 15:42 schrieb Tim Blechmann :
>>> 
>>> hi all,
>>> 
>>> i've read a lot about qml caching in qt-5.8. however i didn't find any
>>> documentation on how to use it.
>>> 
>>> is there any documentation on how we can use it from a cmake
>>> buildsystem? i suppose somehow the qrc files need to be pre-processed to
>>> generate the qmlc/jsc files?
>>> 
>>> thanks a lot!
>>> 
>>> tim
> 
> 
> ___
> 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