Re: [Interest] What is Qt.red for in QML?

2015-02-05 Thread Rutledge Shawn

On 6 Feb 2015, at 02:36, Jérôme Godbout jer...@bodycad.com wrote:

 Sorry read too fast the original post, try to print it, if the int is 0, I 
 would guess it's an indexer for rgba values of some sort. May be wrong on 
 this not near my computer to test
 
 
 
 On Feb 5, 2015, at 8:29 PM, Ian Monroe i...@monroe.nu wrote:
 
 On Thu, Feb 5, 2015 at 3:33 PM, Jérôme Godbout jer...@bodycad.com wrote:
 you can use the string version
 color: 'red'
 or rgba value
 color: Qt.rgba(1,0,0,1)
 
 Doesn't answer Jason's question, I assume it is some historical oddity.  

It comes from Qt::GlobalColor, and is an enum intended for usage in C++ when 
you construct a QColor.  So the value is 7.  It is accessible in QML only 
because everything from the Qt namespace is made available.  Being able to 
assign this enum to a value of type QColor in QML would require a little more 
magic in the QML engine, which is not implemented AFAIK.  I agree it feels a 
bit awkward to write a symbolic color as a quoted string in QML… it leaves you 
wondering if it is stored that way.  (It isn’t, though; since any color 
property in Qt Quick is a QColor, it has to call the QColor constructor taking 
a QString.  Still, a QString had to be constructed, and then thrown away.  In 
an interpreted language, this is only a drop in the bucket.)  But specifying 
Qt.red wouldn’t really feel much better, would it?  It’s still a few extra 
characters to type, and it’s arbitrary to have it in the Qt namespace as 
opposed to a Color namespace.

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


Re: [Interest] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Rainer Wiesenfarth

Am 05.02.2015 um 20:21 schrieb Till Oliver Knoll:

[...]
Other links that I found seem to support that, that the underlying
scheduler figures out the best read/write strategy, and any attempt by
the application to implement that by itself would be counter-productive
[...]


One addition: If using the OS without an own scheduler, it makes sense 
to give the OS an idea what you are about to do with the file. Reading 
chunks of 256 bytes vs. reading chunks of 1 MB vs. mapping the whole 
file into memory probably has a higher impact on performance than the 
number of threads used.


For your application: Memory mapping the files, limiting the total 
mapped size and thus the number of simultaneously mapped files should 
give the best performance. If you have eight worker threads, each may 
map its input file into memory and simply access it. The writer part 
then could be a single thread.


Personally, I would give QtConcurrent::mappedReduced() the first try, 
with all reading (on memory mapped files) and resampling in the map 
function and the writing in the reduce function.


Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

--
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] How to do a correct drop shadow on a QML Rect?

2015-02-05 Thread Jason H
These flat interfaces are all the rage these days. So I want to make a drop 
shadow. However the two approaches I can think of don't work.

First is the QML DropShadow element. This creates a shadow of a constant color 
when the source is a rect. It is pixel-equivalent to just another Rect, so that 
is out.

The next is doing my own drop shadow by using 2 Rect with a gradient. 
(horizontal + vertical) This will render a continuous gradient (good) but won't 
do the bottom right corner. You can either double blend it, or skip it. Either 
way, it doesn't look right.


So is there a way to shadow a rect?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Installing on a headless server

2015-02-05 Thread Bo Thorsen
On 02/05/2015 09:04 PM, Jason H wrote:
 I need to install Qt (Enterprise) on a headless server (CentOS) (I use 
 -platform minimal) . There is only the GUI installer.

 How can I get Qt installed on the server so I can generate reports?

 --OR--

 How can I build my package for distribution (incl deps)  to the headless 
 server?

Forget the binary package, it's impossible for you to use in this case.

Take the centos Qt source package(s?), replace the opensource sources 
with the enterprise sources in the package, rename to qt-enterprise or 
something, build the package.

That will give you a set of native centos packages with dependency info 
in them and an easy upgrade path later. It also allows you to easily 
distribute patches, if you need them.

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] How to do a correct drop shadow on a QML Rect?

2015-02-05 Thread Ben Lau
Hi Jason,

Here is an example to attach shadow in material design style to rectangle
object:

https://github.com/benlau/quickandroid/blob/master/QuickAndroid/Shadow.qml



On 6 February 2015 at 12:01, Jason H jh...@gmx.com wrote:

 These flat interfaces are all the rage these days. So I want to make a
 drop shadow. However the two approaches I can think of don't work.

 First is the QML DropShadow element. This creates a shadow of a constant
 color when the source is a rect. It is pixel-equivalent to just another
 Rect, so that is out.

 The next is doing my own drop shadow by using 2 Rect with a gradient.
 (horizontal + vertical) This will render a continuous gradient (good) but
 won't do the bottom right corner. You can either double blend it, or skip
 it. Either way, it doesn't look right.


 So is there a way to shadow a rect?
 ___
 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] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Keith Gardner

 Does it make sense to guarantee/enforce sequential (exclusive) access to
 the harddisk on application level, or would I re-invent functionality
 already present in the underlying OS/disk driver (and maybe even sacrifice
 performance)?


It depends on the task at hand.  If you know you are going to perform
significant IO, it makes sense to limit the number of reads/writes to the
storage device.  This is especially true when the storage medium is slow.


 Specifically I have the following scenario in mind: batch image
 conversion. Let's assume we have a Work Queue (original images) and a
 Result Queue (processed images). Some worker pool would dequeue (take)
 work items (images) from the Work Queue, process it and enqueue (put) it
 into the Result Queue.


Have you looked at ThreadWeaver (
http://api.kde.org/frameworks-api/frameworks5-apidocs/threadweaver/html/index.html)?
They have an example application that does the exact scenario you are
describing.  In this case, you would have a thread pool and you would just
issue jobs instead of managing your threads directly.

You can have a job that performs the IO and put restrictions on how many of
those jobs can be run in concurrently.

If the answer is don't bother in your application! Just read and write at
 the same time and the OS/driver will figure out the best access pattern for
 you already!, then I guess consideration of SSDs probably become moot.


I am using ThreadWeaver on an embedded device that has to write to an
SD-Card.  File IO is painfully slow but using ThreadWeaver allows for me to
rate limit complex events appropriately.  When moving my application to an
SSD, I just change how many concurrent File IO events run in parallel so
that it can scale with the system.

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


Re: [Interest] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Till Oliver Knoll

 Am 05.02.2015 um 14:25 schrieb Till Oliver Knoll 
 till.oliver.kn...@gmail.com:
 
 ...
 
 Does it make sense to guarantee/enforce sequential (exclusive) access to the 
 harddisk on application level, or would I re-invent functionality already 
 present in the underlying OS/disk driver (and maybe even sacrifice 
 performance)?

I eventually found a link which seems to confirm that it would be best to only 
have sequential read/write access with physically spinning drives, that is, 
have some kind of IO Manager in the application:

http://www.tomshardware.co.uk/forum/251768-32-impact-concurrent-speed

Off course the tricky part then is that the Writer thread does not block the 
Reader thread for too long, such that the Work Queue would become empty (and 
the worker threads would be sitting there idle).

Likewise the Writer thread must have enough chances to write, such that the 
Result Queue becomes not too large (memory constraints). Probably some kind 
of priorisation scheme taking Queue counts into consideration is the answer - 
but not part of my question; I am really just interested in whether concurrent 
read/write access should be avoided in the first place these days (or not).

For SSDs it still might be okay (or even better?) to use concurrent read/write 
access?

Any other thoughts on that?

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


Re: [Interest] Q_OS_ANDROID macro

2015-02-05 Thread Francisco Ares
2015-02-04 16:32 GMT-02:00 Giuseppe D'Angelo giuseppe.dang...@kdab.com:

 Il 04/02/2015 11:18, Reinhardt Behm ha scritto:

 MOC does not understand and therefor does not respect macros and #ifdef.


 I'm sorry to be blunt, but this is simply false. moc has had a full C++
preprocessor since Qt 5.0.

 --
 Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Software Engineer
 KDAB (UK) Ltd., a KDAB Group company
 Tel. UK +44-1738-450410, Sweden (HQ) +46-563-540090
 KDAB - Qt Experts - Platform-independent software solutions


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


Sorry, I'm used to Qt up to 4.8.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Harri Pasanen

On 05/02/2015 14:44, Till Oliver Knoll wrote:


Am 05.02.2015 um 14:25 schrieb Till Oliver Knoll 
till.oliver.kn...@gmail.com mailto:till.oliver.kn...@gmail.com:



...

Does it make sense to guarantee/enforce sequential (exclusive) 
access to the harddisk on application level, or would I re-invent 
functionality already present in the underlying OS/disk driver (and 
maybe even sacrifice performance)?


I eventually found a link which seems to confirm that it would be best 
to only have sequential read/write access with physically spinning 
drives, that is, have some kind of IO Manager in the application:


http://www.tomshardware.co.uk/forum/251768-32-impact-concurrent-speed

Off course the tricky part then is that the Writer thread does not 
block the Reader thread for too long, such that the Work Queue would 
become empty (and the worker threads would be sitting there idle).


Likewise the Writer thread must have enough chances to write, such 
that the Result Queue becomes not too large (memory constraints). 
Probably some kind of priorisation scheme taking Queue counts into 
consideration is the answer - but not part of my question; I am really 
just interested in whether concurrent read/write access should be 
avoided in the first place these days (or not).


For SSDs it still might be okay (or even better?) to use concurrent 
read/write access?





The usual answer is it depends..

It depends on how much data you are accessing at each write/read. It 
also depends on the underlying filesystem and size of files / how many 
files you are dealing with.


It also depends on your disk array, if you have one or more disks and 
capacity of the disks, which affects then number of read/write heads the 
disk has.  Also The NCQ* implementation and cache RAM amount in a disk 
makes a difference.


Then it depends if you need transactional writes, does the write need to 
sync immediately?
If you are on linux, you already get a lot of optimization out of the 
box, it is typically much better than any other OS.  But even within 
linux the filesystem used makes a difference, for example some 
filesystems are good with lots of small files.   Sometimes file deletion 
is the bottleneck.


In the end in spinning drives the underlying physics of spinning media 
and moving read/write heads affect things.


SSDs are typically ~100 times faster in seek operations.   Even there 
controllers cause significant differences depending on read/write patterns.


So before optimizing I'd benchmark, especially on linux the filesystem 
layer typically does a decent job already.


But if you want maximum IO performance, the rule of thumb is to group 
your reads and writes, and read/write as much data as possible at once. 
  Even SSDs typically favor this.  In highly parallel supercomputer 
settings different rules may apply.


Just my 2 cents,

Harri

*http://en.wikipedia.org/wiki/Native_Command_Queuing


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


Re: [Interest] Qt 5 Creator (Mac) Debugger should use the system python executable

2015-02-05 Thread René J . V . Bertin
On Wednesday February 04 2015 23:44:25 André Pönitz wrote:

 The solution is to start LLDB, and use the Python it links to implicitly
 by using the LLDB 'script' command, instead of hoping that the system Python 
 is the right one.

In fact, are you really sure??

I just did this on OS X:
% lldb 
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
 sys.executable
'/opt/local/bin/python'
 sys.version
'2.7.5 (default, Mar  9 2014, 22:15:05) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 
(clang-500.0.68)]'

That's MacPorts' python, not the system one, and the one that's first in my 
path but which caused errors debugging in Qt Creator before I realised I was 
tapping into the wrong Python ...

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


[Interest] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Till Oliver Knoll
Hi all,

This is somewhat unrelated to Qt, but I hope one or another has stumbled over 
this and can share some thoughts.

Does it make sense to guarantee/enforce sequential (exclusive) access to the 
harddisk on application level, or would I re-invent functionality already 
present in the underlying OS/disk driver (and maybe even sacrifice performance)?

I first want to focus on slow physically spinning harddisks before we come to 
SSD (in case that makes a significant difference anyway).

Specifically I have the following scenario in mind: batch image conversion. 
Let's assume we have a Work Queue (original images) and a Result Queue 
(processed images). Some worker pool would dequeue (take) work items (images) 
from the Work Queue, process it and enqueue (put) it into the Result Queue.

The Work Queue size would be limited, but as soon as the count would drop below 
some threshold some Reader thread would fill it again (by reading images from 
disk).

Likewise the Result Queue would be emptied by a Writer thread.

Now my question is about whether to fill the Work Queue (read from disk) and 
empty the Result Queue (write to disk) concurrently (2 threads: Reader and 
Writer), or have the disk access go through some kind of IO Manager, such 
that disk access is sequential (be it read or write operations, while making 
sure not to starve either operation, e.g. some fair access pattern).

To clarify: I do not want to have multiple threads to all /read/ different 
files at the same time (or write, for that matter - at least for now). My 
concern is not to trash the hardisk by reading and writing at the same time. 
Or rather: whether I should be concerned at all on an application level.

If the answer is don't bother in your application! Just read and write at the 
same time and the OS/driver will figure out the best access pattern for you 
already!, then I guess consideration of SSDs probably become moot.

If the answer would be avoid concurrent read/write access on spinning 
harddisks!, would it be different for SSDs then?


Thanks for sharing your thoughts!
  Oliver


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


Re: [Interest] double-buffering, quality drop

2015-02-05 Thread Alexander Semke
Am Mittwoch, 4. Februar 2015, 11:22:15 schrieben Sie:
 not sure how the graphicsitem comes into all of this, but no you cant draw
 on it.
Well, we use QGraphicsScene/View with QGraphicsItems. 

 you can draw on a QGraphicsWidget or you can derive from
 QGraphicsItem and draw in its paint() method.
The Curve-class is already derived from QGraphicsItem and I reimplement the 
paint()-function. As you suggested, I use the QPainter passed to this function 
to draw onto a QPixmap. Once I'm done with this I want to call 
painter-drawPixmap()  to draw on the QGraphicsItem...
Also, by making the painter to paint on the pixmap with painter.begin(pixmap) 
I get the warning QPainter is already active - the painter is already 
initialized/prepared for the graphics item.

Any other ideas?

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


[Interest] Wrong App Name on Android

2015-02-05 Thread Jason H

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


Re: [Interest] Wrong app name on android

2015-02-05 Thread Harri Pasanen
On 05/02/2015 16:48, Jason H wrote:
 So I have an app name in the Application: Application Name field of the 
 manifest viewer.

 But when I deploy it, it only comes up with the Qt project name (project in 
 project.pro)

 How do I get the version on the phone to match the Application name?


Hmm... I don't recall exact details, but I believe I edited the manifest 
by hand, in
  application android:label=NameHere

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


[Interest] Wrong app name on android

2015-02-05 Thread Jason H
So I have an app name in the Application: Application Name field of the 
manifest viewer. 

But when I deploy it, it only comes up with the Qt project name (project in 
project.pro)

How do I get the version on the phone to match the Application name?

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


Re: [Interest] Wrong app name on android

2015-02-05 Thread Jason H
There I have: android:label=@string/app_name

Which in android world is a reference to a string in the resources file. I 
guess Qt is supplying the project name, not the Application Name.

I manually edited the label for the activity and it and works! I think this 
should be a bug. So I made one.
https://bugreports.qt.io/browse/QTBUG-44324


 Sent: Thursday, February 05, 2015 at 3:22 PM
 From: Harri Pasanen ha...@mpaja.com
 To: Jason H jh...@gmx.com
 Cc: interest@qt-project.org
 Subject: Re: [Interest] Wrong app name on android

 Hmm... I seem to have android:label attribute both for application and 
 activity
 It may well be the latter that is shown under the icon.
 
 On 05/02/2015 21:14, Jason H wrote:
  Yes.
  I checked the application android:label=NameHere and it is correct. But 
  I still get project as the application label in the phone's 
  (launcher/home screen/app list).
  When I say it does not match I mean to say that label=NameHere does not 
  match what is in the phone.
 
 
  Thanks.
 
  Sent: Thursday, February 05, 2015 at 2:58 PM
  From: Harri Pasanen ha...@mpaja.com
  To: Jason H jh...@gmx.com
  Cc: interest@qt-project.org
  Subject: Re: [Interest] Wrong app name on android
 
  Just to clarify, are you talking about the name that appears below the
  icon in Android launcher?
  Have you checked what name is in the phone app settings?
 
  Manifest and xml are the same thing to me, AndroidManifest.xml, so I
  don't quite parse your sentence below either...
 
  Harri
 
  On 05/02/2015 20:26, Jason H wrote:
  I've checked the manifest The correct value is there... and 
  uninstalled/reinstalled and it still does not match what is in the XML.
 
  I pushed it via the debugger - but other people who download it from the 
  app store have the same problem.
 
  Sent: Thursday, February 05, 2015 at 10:54 AM
  From: Harri Pasanen ha...@mpaja.com
  To: interest@qt-project.org
  Subject: Re: [Interest] Wrong app name on android
 
  On 05/02/2015 16:48, Jason H wrote:
  So I have an app name in the Application: Application Name field of the 
  manifest viewer.
 
  But when I deploy it, it only comes up with the Qt project name 
  (project in project.pro)
 
  How do I get the version on the phone to match the Application name?
 
  Hmm... I don't recall exact details, but I believe I edited the manifest
  by hand, in
  application android:label=NameHere
 
  ___
  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] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Till Oliver Knoll
Hi Harri, Rainer,

thanks for sharing your thoughts!

Am 05.02.15 um 15:19 schrieb Harri Pasanen:
 On 05/02/2015 14:44, Till Oliver Knoll wrote:

 Am 05.02.2015 um 14:25 schrieb Till Oliver Knoll
 till.oliver.kn...@gmail.com mailto:till.oliver.kn...@gmail.com:

... I am really
 just interested in whether concurrent read/write access should be
 avoided in the first place these days (or not).
 ...
 The usual answer is it depends..
 
 It depends on how much data you are accessing at each write/read.   It
 also depends on the underlying filesystem and size of files / how many
 files you are dealing with.

In my concrete use case I have ordinary single harddisk desktop
systems in mind, that is, no embedded (limited) hardware, but also no
dedicated file server with RAID, highly optimised Super-Filesystem and
so on - just plain vanilla desktops.

Also, in my concrete use case I have batch resize of photos in mind,
where each file is around 5 (JPEG) - 25 (Raw) MByte in size.

I don't know how fast the actual resizing will be - I have a combined
CPU/GPU solution in mind, for the sake of getting a bit into OpenCL -
but I imagine it won't empty the Work Queue faster than I can fill it
by reading the original images from disk and enqueuing it into the Work
Queue. Also, I plan to have a size limit of the Work Queue, so I imagine
I won't be reading full steam all the time (but who knows - maybe I
end up being able to scale an image faster than I can read and decode
the JPEG data ;))

So whenever I am not reading I could use that time to empty the Result
Queue and write the data to disk.

And off course the assumption is that we read and write from/to the same
harddisk ;)

I guess there are still a lot of depends in that use case above. I was
hoping to get a general advice/rule of thumb whether it is a good idea
to have two distinct threads, reading/writing concurrently from/to the
harddisk, where the data is big ((several MByte), but not as big as in
streaming a movie (in the order of GB).

 It also depends on your disk array, if you have one or more disks and
 capacity of the disks, which affects then number of read/write heads the
 disk has.  Also The NCQ* implementation and cache RAM amount in a disk
 makes a difference.

I was actually hoping that nowadays modern (say, = 3 years old)
harddisks and Operating Systems (Windows, Linux, Mac) would handle the
above case somehow for me, given that the size of each file is up to 25
MBytes, and I could just go ahead and read/write. Maybe there is even
a technique which optimises concurrent read/write operations (off course
an OS/harddisk controller could only go that far to optimise concurrent
access - I guess when I try to read e.g. 10 times the same file, or even
different files, at different locations then it's game over).

 If you are on linux, you already get a lot of optimization out of the
 box, it is typically much better than any other OS.  But even within
 linux the filesystem used makes a difference, for example some
 filesystems are good with lots of small files.   Sometimes file deletion
 is the bottleneck.
 
 In the end in spinning drives the underlying physics of spinning media
 and moving read/write heads affect things.

In the end I think it is really the required physical moving of that
head, rather than the file system (the file system might have an
influence on how the data is distributed on the physical drive, but I
guess that is negligible with regards to concurrent read/write
operations, no?).

 But if you want maximum IO performance, the rule of thumb is to group
 your reads and writes, and read/write as much data as possible at once.
   Even SSDs typically favor this.  In highly parallel supercomputer
 settings different rules may apply.

That's what my gut feeling tells me as well.

Also Stack Overflow answers to question like these seem to confirm this:

http://stackoverflow.com/questions/5321768/how-many-threads-for-reading-and-writing-to-the-hard-disk


On the other hand Rainer wrote:

Am 05.02.15 um 15:24 schrieb Rainer Wiesenfarth: From: Till Oliver Knoll
 Am 05.02.2015 um 14:25 schrieb Till Oliver Knoll:
 ...
 http://www.tomshardware.co.uk/forum/251768-32-impact-concurrent-speed
 [...]

 Please note that this post is more than five years old. Things -
namely I/O schedulers in operating systems and hard disk caching - have
changed since then.


I was hoping so, too.

 I would _assume_ that any modern OS is capable of scheduling I/O for
maximum performance. In addition, an own I/O scheduler would probably
only work for bare metal access to the harddisk. Otherwise, the
underlying file system and its potential fragmentation might void all
your effort.

 Thus my approach would be to start any number of concurrent reads and
writes that makes sense for the application side and start optimizing if
(and only if!) throughput is too bad.

Other links that I found seem to support that, that the underlying
scheduler figures out the best read/write 

Re: [Interest] pyqtdeployed app crashes android but not iOS

2015-02-05 Thread lloyd konneker
 I have determined that it fails here in pythonrun.c in function initstdio():

fd = fileno(stdin);
/* Under some conditions stdin, stdout and stderr may not be connected
 * and fileno() may point to an invalid file descriptor. For example
 * GUI apps don't have valid standard streams by default.
 */
if (!is_valid_fd(fd)) {
std = Py_None;
Py_INCREF(std);
}
else {
   std = create_stdio(iomod, fd, 0, stdin, encoding, errors);
   if (std == NULL) {   this is true and it proceeds to return an error 
and abort

I haven’t determined yet why create_stdio fails, or why fileno(stdin) returns a 
valid fd if there is no stdin for the process on Android?

I don’t understand the rationale here: why every process should have a stdin 
and why the Python interpreter needs to initialize it (especially on Android 
with PyQt.)

One comment in the discussion of Python issue 17797 says a workaround is to 
redirect stdio to a file before calling Py_InitializeEx (and thus initstdio() )

Note that issue 17797 has recent comments in the last few days.  The thread 
says any ‘fix’ for Python (at least in regards Windows VS11 as a culprit) must 
wait till Python3.5.  The pertinent code in Python seems to have been changed 
recently.___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Wrong app name on android

2015-02-05 Thread Jason H
I've checked the manifest The correct value is there... and 
uninstalled/reinstalled and it still does not match what is in the XML.

I pushed it via the debugger - but other people who download it from the app 
store have the same problem.

 Sent: Thursday, February 05, 2015 at 10:54 AM
 From: Harri Pasanen ha...@mpaja.com
 To: interest@qt-project.org
 Subject: Re: [Interest] Wrong app name on android

 On 05/02/2015 16:48, Jason H wrote:
  So I have an app name in the Application: Application Name field of the 
  manifest viewer.
 
  But when I deploy it, it only comes up with the Qt project name (project 
  in project.pro)
 
  How do I get the version on the phone to match the Application name?
 
 
 Hmm... I don't recall exact details, but I believe I edited the manifest 
 by hand, in
   application android:label=NameHere
 
 ___
 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] Additional output from QtCore

2015-02-05 Thread Valery Kotov
Greetings everybody!

I'm looking for a piece of advice. Let me describe the problem. We have
QTimer which emits a signal each N seconds. The timer has queued connection
between timeout signal and sltTimeout slot. The slot has some output (to
identify if the signal was emitted).
For some time we have everything working perfectly fine: timer emit signal
each N seconds and sltTimeout printouts appeared each N seconds. At some
moment in time we stop receiving them, but other traces from the process
are available. Unfortunately, as far as connection is queued we can't
really say if the signal was emitted but was not handled.
Is there any way to get any additional information from QtQore about it's
internal message queue? I think it could give us some intuition why we
missed QTimer event. Could you point at some modules or classes in qtbase
which can give me an impression about what is going on inside qt?
I would really appreciate any advises from your side.

Thank you!
-- 
Sincerely yours,
Valery Kotov
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Rainer Wiesenfarth
From: Till Oliver Knoll
 Am 05.02.2015 um 14:25 schrieb Till Oliver Knoll:
  ...
  
  Does it make sense to guarantee/enforce sequential (exclusive)
  access to the harddisk on application level, or would I
  re-invent functionality already present in the underlying
  OS/disk driver (and maybe even sacrifice performance)?
 
 I eventually found a link which seems to confirm that
 it would be best to only have sequential read/write access
 with physically spinning drives, that is, have some kind of
 IO Manager in the application:
 
 http://www.tomshardware.co.uk/forum/251768-32-impact-concurrent-speed
 [...]

Please note that this post is more than five years old. Things - namely I/O 
schedulers in operating systems and hard disk caching - have changed since then.

I would _assume_ that any modern OS is capable of scheduling I/O for maximum 
performance. In addition, an own I/O scheduler would probably only work for 
bare metal access to the harddisk. Otherwise, the underlying file system and 
its potential fragmentation might void all your effort.

Thus my approach would be to start any number of concurrent reads and writes 
that makes sense for the application side and start optimizing if (and only 
if!) throughput is too bad.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Geospatial
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/geospatial/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer


smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Semi OT] Concurrent (multi-threaded) read/write disk IO?

2015-02-05 Thread Till Oliver Knoll
Am 05.02.2015 um 14:44 schrieb Keith Gardner kreios4...@gmail.com:

Thanks for the quick reply!

 ...
 Specifically I have the following scenario in mind: batch image 
 conversion. ...
 
 Have you looked at ThreadWeaver 
 (http://api.kde.org/frameworks-api/frameworks5-apidocs/threadweaver/html/index.html)?
   They have an example application that does the exact scenario you are 
 describing.  In this case, you would have a thread pool and you would just 
 issue jobs instead of managing your threads directly.

I have quickly read the description. At a quick glance ThreadWeaver seems to be 
the equivalent of Grand Central Dispatch or an extended QThreadPool/QRunnable.

At the moment I am not yet concerned about how I would organise my 
Reader/Writer/Worker threads.

At the moment my question is rather: does it actually make sense to have two 
distinct Reader/Writer threads (assuming concurrent access to the harddisk, 
which would be magically optimised by the underlying OS), or shall I just have 
one single thread which either reads or writes at a time?

  
 You can have a job that performs the IO and put restrictions on how many of 
 those jobs can be run in concurrently.

Or in other words, given such an organisation of threads (jobs): shall I or 
shall I not put restrictions on such IO jobs?

 
 If the answer is don't bother in your application! Just read and write at 
 the same time and the OS/driver will figure out the best access pattern for 
 you already!, then I guess consideration of SSDs probably become moot.
 
 I am using ThreadWeaver on an embedded device that has to write to an 
 SD-Card.  File IO is painfully slow but using ThreadWeaver allows for me to 
 rate limit complex events appropriately. 

So I understand concurrent read/write on an SD-Card is worse than sequential, 
and you solved that by (rate) limiting the number of concurrent IO jobs to 1.

In my case I am only concerned about desktop class systems (Mac, Linux, 
Windows), but I get your message: even iMacs with their rather slow laptop 
class harddisks would suffer if I would read/write at the same time.

Then again: don't those desktop class OSes have sophisticated IO algorithms 
which would maybe slightly delay a write operation (buffering it in the 
meantime), until a given read operation would stop? Or in other words: wouldn't 
those OSes (or the harddisk drivers or even harddisk controllers/firmwares) 
interleave my continuous read/write requests in a clever way already, such as 
not to thrash the disk too much?

Somehow I have the feeling that by enforcing sequential access on application 
level (in whatever means: restricting the number of concurrent IO Jobs to 1, 
homegrown IO Manager...) I would re-invent the wheel, or even worse: 
sacrifice IO performance (since the OS would do a way better job at scheduling 
read/write requests)

 When moving my application to an SSD, I just change how many concurrent File 
 IO events run in parallel so that it can scale with the system.

So I understand concurrent read/write access is not such a problem for SSDs.

It would be nice if I would not have to distinguish between slow moving 
harddisk and SSD in my application and the underlying OS would do the 
optimal read/write access pattern for me.

Then on the other hand I am realist and I get from your experience that I /do/ 
have to care on application level...

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


Re: [Interest] Qt 5 Creator (Mac) Debugger should use the system python executable

2015-02-05 Thread René J . V . Bertin
On Thursday February 05 2015 20:57:53 André Pönitz wrote:

Hi André

  I haven't looked at the Creator code for a while, but doesn't it launch
  Python with a .py file?
 
 Not anymore.

Ok, from what version if I may ask?

 Invoking sys.executable inside LLDB does not reliably produce a Python
 executable usable with that LLDB. Not even on Linux.

This probably more a question to ask on the lldb ML, but that surprises me more 
than just a bit. My OS X lldb (inside the Xcode bundle) is linked against 
/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/LLDB, which in 
turn is linked against 
/System/Library/Frameworks/Python.framework/Versions/2.7/Python . So that's the 
python it should be loading when it starts an embedded interpreter.
I see that that interpreter indeed gives a sys.path that includes the paths 
from my MacPorts python-2.7 , which I never realised was possible. 
Interestingly sys.version is unchanged though...

 The point of invoking LLDB first is to not have to care where its Python
 support infrastructure lives.

No argument there, it makes sense, and means this thread came too late (pending 
verification, though ;)).

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


[Interest] Qml Compiler fails

2015-02-05 Thread Jason H
I added StyledTextField.qml to my qml.qrc,  when I compile now it says:
qtquickcompiler_loader.o: In function 
`QtQuickCompilerGeneratedModule::__StyledTextField_qml::createCompilationUnit()':
/home/jason/Projects/build-xxx-Desktop_Qt_5_4_0_GCC_64bit-Debug/.qtquickcompiler/qtquickcompiler_loader.cpp:467:
 undefined reference to 
`QtQuickCompilerGeneratedModule::__StyledTextField_qml::moduleFunctions'
/home/jason/Projects/build-xxx-Desktop_Qt_5_4_0_GCC_64bit-Debug/.qtquickcompiler/qtquickcompiler_loader.cpp:467:
 undefined reference to 
`QtQuickCompilerGeneratedModule::__StyledTextField_qml::qmlData'
qtquickcompiler_loader.o:(.data.rel.ro+0x320): undefined reference to 
`QtQuickCompilerGeneratedModule::__StyledTextField_qml::qmlData'

This is the first file I've added since switching to the QML compiler. I did a 
rebuild.  What is going wrong?

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


[Interest] hi-res drawing on Windows

2015-02-05 Thread John Weeks
Is there a comprehensive overview of drawing for monitors at various 
resolutions on Windows?

I am trying to get our application to work correctly on a hi-res monitor on 
Windows. In particular, I have a QToolButton-derived class that makes a button 
that is just the icon, with no visible frame. It overrides sizeHint(), 
maximumSize() and paintEvent() to do this. Instances of the button are given 
icons from PNG resources that have  both standard and @2x versions.

One point of this class is to size the button based on the size of the icon. 
Thus, sizeHint() and maximumSize() both return iconSize(). In the paintEvent(), 
I get the icon out of the button using icon(), get the QWindow for the window 
hosting the button and then use QIcon::pixmap(QWindow *, iconSize(), ...) to 
get the appropriate QPixmap to draw.

On Macintosh this works great. On my 5k iMac I get the correct size and hi-res 
pixmap. Slide the window over to my external standard-res monitor and it 
redraws with the standard res pixmap.

On Windows, I don't have a hi-res monitor. I'm faking it by setting Change the 
size of all items to Larger 150%. That's another way to say, Make my large 
monitor small :) Not ideal, and it's not 2x, so I don't really expect the 2x 
icons. What I DO expect is the QWindow::devicePixelRatio() might return 1.5, 
but all I get is 1.0 at all settings of size of all items.

I found this:
http://doc-snapshot.qt-project.org/qt5-5.4/highdpi.html

Since I'm on Windows 8.1 I should be in Per-Monitor DPI Aware mode. It seems 
like I shouldn't have to intervene in order to get resolution-independent pixel 
drawing.

If I do this before creating my QApplication instance:
qputenv(QT_DEVICE_PIXEL_RATIO, 2)
then I get 2.0 from devicePixelRatio(), as expected. I also get my hi-res icons.

If I do this instead:
qputenv(QT_DEVICE_PIXEL_RATIO, 1.5)
then devicePixelRatio returns 1.0, not 1.5.

And it doesn't seem like I should have to set this myself, anyway.

Thanks for any insight you might be able to offer!

-John Weeks

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


[Interest] What is Qt.red for in QML?

2015-02-05 Thread Jason H
Rectangle {
...
color: red // works
color: Qt.red // does not work Unable to assign int to QColor
}

Why? What is Qt.red for then?

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


Re: [Interest] What is Qt.red for in QML?

2015-02-05 Thread Jérôme Godbout
you can use the string version 
color: 'red'
or rgba value
color: Qt.rgba(1,0,0,1)




 On Feb 5, 2015, at 6:07 PM, Jason H jh...@gmx.com wrote:
 
 Rectangle {
 ...
 color: red // works
 color: Qt.red // does not work Unable to assign int to QColor
 }
 
 Why? What is Qt.red for then?
 
 Thanks
 ___
 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] hi-res drawing on Windows

2015-02-05 Thread Jason H
I don't know why that variable exists. It's useless as far as I can tell. Maybe 
it means that you are being scaled?

I use Screen.pixelDensity. Which varies as you think it should, but is spec'd 
in px per mm, not DPI.

That pixelRatio is either 1 or 0, I don't think it is ever in between. In 
theory on a 2x device the pixelDenisty will be 2x the 1x.
Meanwhile pixel ratio is:
old (10yr) monitor: 4.x
Samsung Note 2: 10.x
Moto X: 16.x



 Sent: Thursday, February 05, 2015 at 5:29 PM
 From: John Weeks j...@wavemetrics.com
 To: interest@qt-project.org interest@qt-project.org
 Subject: [Interest] hi-res drawing on Windows

 Is there a comprehensive overview of drawing for monitors at various 
 resolutions on Windows?
 
 I am trying to get our application to work correctly on a hi-res monitor on 
 Windows. In particular, I have a QToolButton-derived class that makes a 
 button that is just the icon, with no visible frame. It overrides sizeHint(), 
 maximumSize() and paintEvent() to do this. Instances of the button are given 
 icons from PNG resources that have  both standard and @2x versions.
 
 One point of this class is to size the button based on the size of the icon. 
 Thus, sizeHint() and maximumSize() both return iconSize(). In the 
 paintEvent(), I get the icon out of the button using icon(), get the QWindow 
 for the window hosting the button and then use QIcon::pixmap(QWindow *, 
 iconSize(), ...) to get the appropriate QPixmap to draw.
 
 On Macintosh this works great. On my 5k iMac I get the correct size and 
 hi-res pixmap. Slide the window over to my external standard-res monitor and 
 it redraws with the standard res pixmap.
 
 On Windows, I don't have a hi-res monitor. I'm faking it by setting Change 
 the size of all items to Larger 150%. That's another way to say, Make my 
 large monitor small :) Not ideal, and it's not 2x, so I don't really expect 
 the 2x icons. What I DO expect is the QWindow::devicePixelRatio() might 
 return 1.5, but all I get is 1.0 at all settings of size of all items.
 
 I found this:
 http://doc-snapshot.qt-project.org/qt5-5.4/highdpi.html
 
 Since I'm on Windows 8.1 I should be in Per-Monitor DPI Aware mode. It 
 seems like I shouldn't have to intervene in order to get 
 resolution-independent pixel drawing.
 
 If I do this before creating my QApplication instance:
 qputenv(QT_DEVICE_PIXEL_RATIO, 2)
 then I get 2.0 from devicePixelRatio(), as expected. I also get my hi-res 
 icons.
 
 If I do this instead:
 qputenv(QT_DEVICE_PIXEL_RATIO, 1.5)
 then devicePixelRatio returns 1.0, not 1.5.
 
 And it doesn't seem like I should have to set this myself, anyway.
 
 Thanks for any insight you might be able to offer!
 
 -John Weeks
 
 ___
 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] hi-res drawing on Windows

2015-02-05 Thread John Weeks

 On Feb 5, 2015, at 3:03 PM, Jason H jh...@gmx.com wrote:
 int
 That pixelRatio is either 1 or 0, I don't think it is ever in between.

Well, during development of my button class, when I had bugs :) I saw QPixmap 
return devicePixelRatio between 1.0 and 2.0. Maybe that's just QPixmap, though.

-John Weeks

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


[Interest] Custom QQuickItem with Mouse area

2015-02-05 Thread Jérôme Godbout
Hi, I'm trying to create a custom QItem by enabling flag ItemHasContent to true 
and defining the updatePaintNode() function. It work well and it's fast even 
for large number of item, 2d points to create a shape. But the mouse area for 
those draw item are the whole bounding rectangle containing the item. Is there 
a way to create a mask image of the rendered item to filter mouse event based 
on the Item draw pixel? or is there a better way to only trigger mouse event 
only on Item draw area (alpha 1)?

Thanks, Jerome


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


Re: [Interest] Flat Light Style How?

2015-02-05 Thread Jason H
The Qt Quick Enterprise Controls Styles module allows custom styling for Qt 
Quick Enterprise Controls.

I want standard controls to be styled too... I thought that it would style all 
controls, not just the enterprise ones as seen in 
https://www.youtube.com/watch?v=wMs1pSZMnG0 about 2:00 in. The page you 
directed me to only lists:
CircularGaugeStyle
DelayButtonStyle
DialStyle
GaugeStyle
PieMenuStyle
StatusIndicatorStyle
ToggleButtonStyle
TumblerStyle

I hope there are more styles than that?



 Sent: Thursday, February 05, 2015 at 11:59 AM
 From: Agocs Laszlo laszlo.ag...@theqtcompany.com
 To: Jason H jh...@gmx.com, interest@qt-project.org 
 interest@qt-project.org
 Subject: Re: [Interest] Flat Light Style How?

 Hi,
 
 See 
 http://doc.qt.io/QtQuickEnterpriseControls/qtquickenterprisecontrolsstyles-index.html
  regarding switching styles.
 
 Cheers,
 Laszlo
 
 
 
 From: interest-bounces+laszlo.agocs=theqtcompany@qt-project.org 
 interest-bounces+laszlo.agocs=theqtcompany@qt-project.org on behalf of 
 Jason H jh...@gmx.com
 Sent: Thursday, February 5, 2015 5:52 PM
 To: interest@qt-project.org
 Subject: [Interest] Flat Light Style How?
 
 I have a commercial license and I can not find any info on how to use Flat 
 Light style.
 
 Can someone clue me in?
 
 Thanks!
 ___
 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] Flat Light Style How?

2015-02-05 Thread Jason H
I have a commercial license and I can not find any info on how to use Flat 
Light style.

Can someone clue me in?

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


Re: [Interest] Flat Light Style How?

2015-02-05 Thread Agocs Laszlo
Hi,

See 
http://doc.qt.io/QtQuickEnterpriseControls/qtquickenterprisecontrolsstyles-index.html
 regarding switching styles.

Cheers,
Laszlo



From: interest-bounces+laszlo.agocs=theqtcompany@qt-project.org 
interest-bounces+laszlo.agocs=theqtcompany@qt-project.org on behalf of 
Jason H jh...@gmx.com
Sent: Thursday, February 5, 2015 5:52 PM
To: interest@qt-project.org
Subject: [Interest] Flat Light Style How?

I have a commercial license and I can not find any info on how to use Flat 
Light style.

Can someone clue me in?

Thanks!
___
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] double-buffering, quality drop

2015-02-05 Thread Reinhardt Behm

On Thursday 05 February 2015 10:30:04 Alexander Semke wrote:
 Am Mittwoch, 4. Februar 2015, 11:22:15 schrieben Sie:
  not sure how the graphicsitem comes into all of this, but no you cant draw
  on it.
 
 Well, we use QGraphicsScene/View with QGraphicsItems.
 
  you can draw on a QGraphicsWidget or you can derive from
  QGraphicsItem and draw in its paint() method.
 
 The Curve-class is already derived from QGraphicsItem and I reimplement the
 paint()-function. As you suggested, I use the QPainter passed to this
 function to draw onto a QPixmap. Once I'm done with this I want to call
 painter-drawPixmap()  to draw on the QGraphicsItem...
 Also, by making the painter to paint on the pixmap with
 painter.begin(pixmap) I get the warning QPainter is already active - the
 painter is already initialized/prepared for the graphics item.
 
 Any other ideas?

I think you misinterpret (no offense intended) the concept of 
QGraphicsScene/View and QGraphicsItem.
In a short and very simplified way:
QGraphicsItem is just a container for the information about what and how to 
draw (position, brush, pen, etc).
QGraphicsScene is manages these items.
The actual drawing is done/induced by QGraphicsView. It creates a QPainter and 
(via QGraphicsScene) calls the paint() function of the items. The painter does 
not paint onto an item but is initialized to draw on the views drawing area.

If you have several view attached to your scene, each view will call the 
item's paint() function as needed with its own painter.

When you call painter.begin(pixmap) you misuse this painter therefore the 
warning.
If you want to manage the painting by internally creating a pixmap you are 
doing something similar to what happens when you enable caching with 
QGraphicsItem::setCacheMode(QGraphicsItem::ItemCoordinateCache).
I think you should create a separate painter for painting on your internal 
pixmap and use the supplied painter to paint() to the draw the pixmap (on the 
view).

You might also have a look at http://www.qcustomplot.com. They are doing 
something similar as you.

-- 
Reinhardt Behm


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


Re: [Interest] Installing on a headless server

2015-02-05 Thread Thiago Macieira
On Thursday 05 February 2015 21:04:34 Jason H wrote:
 I need to install Qt (Enterprise) on a headless server (CentOS) (I use
 -platform minimal) . There is only the GUI installer.
 
 How can I get Qt installed on the server so I can generate reports?
 
 --OR--
 
 How can I build my package for distribution (incl deps)  to the headless
 server?

You'll have better luck compiling from sources yourself.
-- 
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


Re: [Interest] What is Qt.red for in QML?

2015-02-05 Thread Ian Monroe
On Thu, Feb 5, 2015 at 3:33 PM, Jérôme Godbout jer...@bodycad.com wrote:

 you can use the string version
 color: 'red'
 or rgba value
 color: Qt.rgba(1,0,0,1)


Doesn't answer Jason's question, I assume it is some historical oddity.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] What is Qt.red for in QML?

2015-02-05 Thread Jérôme Godbout
Sorry read too fast the original post, try to print it, if the int is 0, I 
would guess it's an indexer for rgba values of some sort. May be wrong on this 
not near my computer to test



 On Feb 5, 2015, at 8:29 PM, Ian Monroe i...@monroe.nu wrote:
 
 On Thu, Feb 5, 2015 at 3:33 PM, Jérôme Godbout jer...@bodycad.com wrote:
 you can use the string version
 color: 'red'
 or rgba value
 color: Qt.rgba(1,0,0,1)
 
 Doesn't answer Jason's question, I assume it is some historical oddity.  
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] onGestureStarted we can grab(), what about release?

2015-02-05 Thread Nuno Santos
Hi,

I’m being faced with a situation where a custom knob is layed out inside nested 
flickables. 

My custom knob touch handling is made with a MultiPointTouchArea to allow 
multiple knob interactions.

To avoid the gesture being grabbed by the flickables where is layed into, I 
call gesture.grab() onGestureStarted.

The problem is that, when the touch terminates, it isn’t released unless I tap 
in another element outside. 

If I don’t do that, the gesture will keep assigned to that particular knob and 
this is an awkward and not welcome behaviour.

I couldn’t find a gesture release on documentation. Maybe i’m missing something 
here.

Does anyone has a clue on how to avoid this problem?

Thanks in advance.

Regards,

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


Re: [Interest] Flat Light Style How?

2015-02-05 Thread Jason H
Oh thanks!

So immedautely, I notice issues. 

Any control that has text (TextField, Button) is not properly accounting for a 
specified pointSize. 

How do I inherit from a flat style for a button?



 Sent: Thursday, February 05, 2015 at 12:11 PM
 From: Agocs Laszlo laszlo.ag...@theqtcompany.com
 To: Jason H jh...@gmx.com
 Cc: interest@qt-project.org interest@qt-project.org
 Subject: Re: [Interest] Flat Light Style How?

 QT_QUICK_CONTROLS_STYLE applies to all controls. Don't be misled by the fact 
 that the page is for enterprise controls.
 
 Cheers,
 Laszlo
 
 
 From: Jason H jh...@gmx.com
 Sent: Thursday, February 5, 2015 6:06 PM
 To: Agocs Laszlo
 Cc: interest@qt-project.org
 Subject: Re: [Interest] Flat Light Style How?
 
 The Qt Quick Enterprise Controls Styles module allows custom styling for Qt 
 Quick Enterprise Controls.
 
 I want standard controls to be styled too... I thought that it would style 
 all controls, not just the enterprise ones as seen in 
 https://www.youtube.com/watch?v=wMs1pSZMnG0 about 2:00 in. The page you 
 directed me to only lists:
 CircularGaugeStyle
 DelayButtonStyle
 DialStyle
 GaugeStyle
 PieMenuStyle
 StatusIndicatorStyle
 ToggleButtonStyle
 TumblerStyle
 
 I hope there are more styles than that?
 
 
 
  Sent: Thursday, February 05, 2015 at 11:59 AM
  From: Agocs Laszlo laszlo.ag...@theqtcompany.com
  To: Jason H jh...@gmx.com, interest@qt-project.org 
  interest@qt-project.org
  Subject: Re: [Interest] Flat Light Style How?
 
  Hi,
 
  See 
  http://doc.qt.io/QtQuickEnterpriseControls/qtquickenterprisecontrolsstyles-index.html
   regarding switching styles.
 
  Cheers,
  Laszlo
 
 
  
  From: interest-bounces+laszlo.agocs=theqtcompany@qt-project.org 
  interest-bounces+laszlo.agocs=theqtcompany@qt-project.org on behalf 
  of Jason H jh...@gmx.com
  Sent: Thursday, February 5, 2015 5:52 PM
  To: interest@qt-project.org
  Subject: [Interest] Flat Light Style How?
 
  I have a commercial license and I can not find any info on how to use Flat 
  Light style.
 
  Can someone clue me in?
 
  Thanks!
  ___
  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] Additional output from QtCore

2015-02-05 Thread Thiago Macieira
On Thursday 05 February 2015 16:22:40 Valery Kotov wrote:
 Greetings everybody!
 
 I'm looking for a piece of advice. Let me describe the problem. We have
 QTimer which emits a signal each N seconds. The timer has queued connection
 between timeout signal and sltTimeout slot. The slot has some output (to
 identify if the signal was emitted).

Why is it queued? You're adding a delay of one full event loop processing 
after the timer fires, which already happens inside the event loop.

 For some time we have everything working perfectly fine: timer emit signal
 each N seconds and sltTimeout printouts appeared each N seconds. At some
 moment in time we stop receiving them, but other traces from the process
 are available. Unfortunately, as far as connection is queued we can't
 really say if the signal was emitted but was not handled.
 Is there any way to get any additional information from QtQore about it's
 internal message queue? I think it could give us some intuition why we
 missed QTimer event. Could you point at some modules or classes in qtbase
 which can give me an impression about what is going on inside qt?
 I would really appreciate any advises from your side.

You can do that if you write a testcase. With QtTest, you can use the -vs 
option to print all signal emissions.

Another option is to just put a breakpoint and debug inside QtCore.

In any case, verify whether the timer is still alive. And drop the queue, 
since it's not really necessary...

-- 
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


[Interest] Installing on a headless server

2015-02-05 Thread Jason H
I need to install Qt (Enterprise) on a headless server (CentOS) (I use 
-platform minimal) . There is only the GUI installer.

How can I get Qt installed on the server so I can generate reports?

--OR--

How can I build my package for distribution (incl deps)  to the headless 
server? 

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


Re: [Interest] Qt 5 Creator (Mac) Debugger should use the system python executable

2015-02-05 Thread André Pönitz
On Thu, Feb 05, 2015 at 02:42:05AM +0100, René J.V. Bertin wrote:
 On Wednesday February 04 2015 23:44:25 André Pönitz wrote:
 
 Hi,
 
  The solution is to start LLDB, and use the Python it links to implicitly by
  using the LLDB 'script' command, instead of hoping that the system Python
  is the right one.
 
 I haven't looked at the Creator code for a while, but doesn't it launch
 Python with a .py file?

Not anymore.

 It's of course not impossible to replace that with a
 sequence
 
 llbd script run our script
 
 but that doesn't strike me as very elegant either.

It doesn't do that either.

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


Re: [Interest] Wrong app name on android

2015-02-05 Thread Jason H
Yes.
I checked the application android:label=NameHere and it is correct. But I 
still get project as the application label in the phone's (launcher/home 
screen/app list).
When I say it does not match I mean to say that label=NameHere does not 
match what is in the phone.


Thanks.

 Sent: Thursday, February 05, 2015 at 2:58 PM
 From: Harri Pasanen ha...@mpaja.com
 To: Jason H jh...@gmx.com
 Cc: interest@qt-project.org
 Subject: Re: [Interest] Wrong app name on android

 Just to clarify, are you talking about the name that appears below the 
 icon in Android launcher?
 Have you checked what name is in the phone app settings?
 
 Manifest and xml are the same thing to me, AndroidManifest.xml, so I 
 don't quite parse your sentence below either...
 
 Harri
 
 On 05/02/2015 20:26, Jason H wrote:
  I've checked the manifest The correct value is there... and 
  uninstalled/reinstalled and it still does not match what is in the XML.
 
  I pushed it via the debugger - but other people who download it from the 
  app store have the same problem.
 
  Sent: Thursday, February 05, 2015 at 10:54 AM
  From: Harri Pasanen ha...@mpaja.com
  To: interest@qt-project.org
  Subject: Re: [Interest] Wrong app name on android
 
  On 05/02/2015 16:48, Jason H wrote:
  So I have an app name in the Application: Application Name field of the 
  manifest viewer.
 
  But when I deploy it, it only comes up with the Qt project name 
  (project in project.pro)
 
  How do I get the version on the phone to match the Application name?
 
  Hmm... I don't recall exact details, but I believe I edited the manifest
  by hand, in
 application android:label=NameHere
 
  ___
  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] Installing on a headless server

2015-02-05 Thread Karl Ruetz
We have built Qt 5.1.1 - Qt 5.3.2  from GIT sources on CentOS 6.x.  The 
Installer does not work for us, even on desktop machines.  I believe it is 
tested primarily for Ubuntu.  ( I could be wrong on that one.)

We will be making our first attempt at a Qt 5.4 on CentOS 7 later today or 
tomorrow.

Karl


 On Feb 5, 2015, at 2:04 PM, Jason H jh...@gmx.com wrote:
 
 I need to install Qt (Enterprise) on a headless server (CentOS) (I use 
 -platform minimal) . There is only the GUI installer.
 
 How can I get Qt installed on the server so I can generate reports?
 
 --OR--
 
 How can I build my package for distribution (incl deps)  to the headless 
 server? 
 
 ___
 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] Wrong app name on android

2015-02-05 Thread Robert Iakobashvili
On Thu, Feb 5, 2015 at 10:14 PM, Jason H jh...@gmx.com wrote:
 Yes.
 I checked the application android:label=NameHere and it is correct. But I 
 still get project as the application label in the phone's (launcher/home 
 screen/app list).
 When I say it does not match I mean to say that label=NameHere does not 
 match what is in the phone.


 Thanks.

 Sent: Thursday, February 05, 2015 at 2:58 PM
 From: Harri Pasanen ha...@mpaja.com
 To: Jason H jh...@gmx.com
 Cc: interest@qt-project.org
 Subject: Re: [Interest] Wrong app name on android

 Just to clarify, are you talking about the name that appears below the
 icon in Android launcher?
 Have you checked what name is in the phone app settings?

 Manifest and xml are the same thing to me, AndroidManifest.xml, so I
 don't quite parse your sentence below either...

 Harri

 On 05/02/2015 20:26, Jason H wrote:
  I've checked the manifest The correct value is there... and 
  uninstalled/reinstalled and it still does not match what is in the XML.
 
  I pushed it via the debugger - but other people who download it from the 
  app store have the same problem.
 
  Sent: Thursday, February 05, 2015 at 10:54 AM
  From: Harri Pasanen ha...@mpaja.com
  To: interest@qt-project.org
  Subject: Re: [Interest] Wrong app name on android
 
  On 05/02/2015 16:48, Jason H wrote:
  So I have an app name in the Application: Application Name field of the 
  manifest viewer.
 
  But when I deploy it, it only comes up with the Qt project name 
  (project in project.pro)
 
  How do I get the version on the phone to match the Application name?
 
  Hmm... I don't recall exact details, but I believe I edited the manifest
  by hand, in
 application android:label=NameHere

Hi Jason,

Do you mean something like this:

QTBUG-41655

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


Re: [Interest] Wrong app name on android

2015-02-05 Thread Harri Pasanen
Hmm... I seem to have android:label attribute both for application and 
activity
It may well be the latter that is shown under the icon.

On 05/02/2015 21:14, Jason H wrote:
 Yes.
 I checked the application android:label=NameHere and it is correct. But I 
 still get project as the application label in the phone's (launcher/home 
 screen/app list).
 When I say it does not match I mean to say that label=NameHere does not 
 match what is in the phone.


 Thanks.

 Sent: Thursday, February 05, 2015 at 2:58 PM
 From: Harri Pasanen ha...@mpaja.com
 To: Jason H jh...@gmx.com
 Cc: interest@qt-project.org
 Subject: Re: [Interest] Wrong app name on android

 Just to clarify, are you talking about the name that appears below the
 icon in Android launcher?
 Have you checked what name is in the phone app settings?

 Manifest and xml are the same thing to me, AndroidManifest.xml, so I
 don't quite parse your sentence below either...

 Harri

 On 05/02/2015 20:26, Jason H wrote:
 I've checked the manifest The correct value is there... and 
 uninstalled/reinstalled and it still does not match what is in the XML.

 I pushed it via the debugger - but other people who download it from the 
 app store have the same problem.

 Sent: Thursday, February 05, 2015 at 10:54 AM
 From: Harri Pasanen ha...@mpaja.com
 To: interest@qt-project.org
 Subject: Re: [Interest] Wrong app name on android

 On 05/02/2015 16:48, Jason H wrote:
 So I have an app name in the Application: Application Name field of the 
 manifest viewer.

 But when I deploy it, it only comes up with the Qt project name 
 (project in project.pro)

 How do I get the version on the phone to match the Application name?

 Hmm... I don't recall exact details, but I believe I edited the manifest
 by hand, in
 application android:label=NameHere

 ___
 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] Qt 5 Creator (Mac) Debugger should use the system python executable

2015-02-05 Thread André Pönitz
On Thu, Feb 05, 2015 at 10:33:09AM +0100, René J.V. Bertin wrote:
 On Thursday February 05 2015 08:22:09 Harri Pasanen wrote:
 
  llbd script run our script
 
  but that doesn't strike me as very elegant either.
 
 
 If it is a long running script, it seems quite elegant to me, as I solves
 the correct python selection as André mentioned.
 
 Maybe elegant wasn't the best choice of words.  The context is of course a
 GUI interface that communicates with lldb through some kind of python
 interface. Depending on how exactly that communication is set up (and python
 started) it might not be straightforward to replace the python call with a
 call to lldb that then needs to be sent a command to start the python
 interpreter, which may not be prepared to handle a non-interactive terminal.
 I haven't had time to look at what exactly goes on in Creator's code.

...

 But for instance, I tried `lldb -o script` and on OS X that got me in a
 Python-prompt-printing dead loop which required me to killall -1 lldb. On
 Linux lldb reacts differently: I get into the Python interpreter after
 sending an EOF (^D), but then every Python expression I tried led to a core
 dump.

I would take that as an indication that this is not the approach taken.
 
 It does seem however that sys.executable points to the correct python
 executable (checked only on Linux).

Invoking sys.executable inside LLDB does not reliably produce a Python
executable usable with that LLDB. Not even on Linux.

 Which leads me to another thought I can't verify ATM because not on a Mac:
 does Qt Creator allow selection of the lldb executable to use?

Yes.

You don't need a Mac to verify. You can have use different executables on
all supported platforms.

 It's not at
 all uncommon to have different versions, and of course each will require the
 use of its own python executable.

The point of invoking LLDB first is to not have to care where its Python
support infrastructure lives.

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