Re: [Interest] Problems with QCamera/QML Camera when trying to porting a desktop application to android tablet

2018-11-13 Thread Roman Wüger
Hello everyone,

I tried it also with the last 5.12 Version without any positive changes. Does 
anyone else have an idea?

Regards

> Am 11.09.2018 um 23:47 schrieb Roman Wüger :
> 
> Hi tony,
> 
> Sorry for the delayed answer, but I was on vacation.
> The same dialog works a expected on Windows and on Linux. So I think it must 
> something be to do with android 
> 
> Regards
> Roman 
> 
>> Am 22.08.2018 um 11:45 schrieb Tony Rietwyk :
>> 
>> Hi Roman, 
>> 
>> Why did you need to use createWindowContainer?  Wouldn't the QQuickView do 
>> as a window anyway?  Have you added a layout to manage sizing the QQuickView 
>> within the created window?  
>> 
>> Are you using resizeMode SizeRootObjectToView?  I think the paragraph in 
>> QQuickView documentation starting 'QQuickView also manages the sizing ...' 
>> is incorrect, whereas the description in the enum QQuickView::ResizeMode 
>> makes more sense.  
>> 
>> Hope that helps! 
>> 
>> Tony
>> 
>> 
>> ___
>> 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


[Interest] efficient natural sorting

2018-11-13 Thread Frank Rueter | OHUfx

Hi,

I need to use the QSortFilterProxyModel to sort strings with numbers in 
them, i.e. perform natural sorting.

I found this snippet online:

|import re def atoi(text): return int(text) if text.isdigit() else text 
def natural_keys(text): return [atoi(c) for c in re.split('(\d+)', 
text)] l = ['Item1', 'Item2', 'Item3', 'Item10', 'Item20'] 
l.sort(key=natural_keys) print l |


This works nicely but I’m wondering if it’s reliable and efficient to 
implement it like this in the QSortFilterProxyModel.lessThan() method?!


|def lessThan(self, source_left, source_right): natural_keys(source_left) 
< natural_keys(source_right) |


Any thoughts on this?

Note: I need to avoid 3rd party libraries.

Cheers,
frank

​
--

ohufxLogo 50x50 
	*vfx compositing  | *workflow 
customisation and consulting * *

**
   


Your gateway to over 1,000 free tools... right inside of Nuke 



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


[Interest] Akward touch behaviour on Windows with MouseArea and MultipointTouchArea

2018-11-13 Thread Nuno Santos
Hi,

I have recently acquired a touch screen. After spending many years developing 
touch applications for iOS and Android, I have finally acquired a touchscreen 
for windows touch development. 

I’m writing to this list because I’m facing an awkward issue with MouseArea and 
MultipointTouchArea.

Let’s suppose I have the following qml code:

MouseArea {
anchors.fill: parent
onPressedChanged: console.log(pressed)
}

MultiPointTouchArea {
anchors.fill: parent
onPressed: console.log(“pressed”);
onReleased: console.log(“released”);
}


What is happening here is that when I touch the screen with either of these 
code piece alone I’m having the same result: the output only comes after the 
finger is released.

At first I decided to look for Windows touch input settings and found the press 
and hold to right click which was enabled. But even after disabling that 
option, the issue remains.

I was expecting to have qml: true / qml: pressed and the finger touches the 
screen and qml: false / qml: released when the finger is lifted from the screen 
but that is not happening.

What am I missing?

I’m on Windows 10 with Qt 5.12 beta 3 MSVC2017 Qt kit.

Thanks in advance!

Best regards,

Nuno




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


Re: [Interest] Disable highlighting in QTreeView

2018-11-13 Thread Igor Mironchik

Hi,

You can override

[virtual protected] voidQTreeView::drawRow(QPainter*painter, const 
QStyleOptionViewItem, const QModelIndex) const


On 13.11.2018 18:12, Nicolas Krieger wrote:


Hi,

Another question about QTreeView, how to disable row highlighting ?

I could'nt find any solution without using css.

--
*Nicolas Krieger*

___
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] Disable highlighting in QTreeView

2018-11-13 Thread Nicolas Krieger

Hi,

Another question about QTreeView, how to disable row highlighting ?

I could'nt find any solution without using css.

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


Re: [Interest] Qt3D QAbstractItemModel to watch QEntity's

2018-11-13 Thread Philip Schuchardt
Yea, it would be really useful to have more add/remove signals. I think
having a way to see if QNode are added/removed to another QNode. There's
currently no way to see if the QNode tree has been modified structurally at
the moment. Aspects can see these changes, via QSceneChanges, but other
that that, it's all private.

I file a bug for converting QNodeId to QNode*: QTBUG-71767

On Tue, Nov 13, 2018 at 5:19 AM Paul Lemire  wrote:

> Hi,
>
> Have you looked into using the signals:
>
> void QComponent::addedToEntity(QEntity *entity);
>
> void QComponent::removedFromEntity(QEntity *entity);
>
> That would be up to you to write a table you would update based on these
> signals to keep track of which entities reference which components.
>
> There's no public way of knowing when a component is added or removed
> from a QEntity though that would be something trivial to add for 5.13 if
> that can make your life easier.
>
> There's no public API to get a QNode* form a QNodeId. Using the private
> API QScene::lookupNode would indeed be an option but keep in mind it
> could be removed, renamed ... in future versions (though unlikely). That
> might be the quickest option to get you started.
>
> Aspects don't get access to the frontend QNode, they only communicate
> with QSceneChanges with ids. Usually aspect create a backend
> representation of the QNode with only the data they care about and with
> the changes and ids, these backend representations are kept in sync with
> the frontend.
>
> You could indeed have an aspect but would have to create backend
> representations for QEntity and your custom QComponent I suppose, which
> sounds like quite a bit of work for what you want to do.
>
> Hopefully this may be of some help,
>
> Paul
>
> --
> Paul Lemire | paul.lem...@kdab.com | Senior Software Engineer
> KDAB (France) S.A.S., a KDAB Group company
> Tel: France +33 (0)4 90 84 08 53, http://www.kdab.fr
> KDAB - The Qt, C++ and OpenGL Experts
>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] TreeView cells background color with delegate

2018-11-13 Thread Nicolas Krieger
I have made a mistake in my explanations, there are delegates for 
columns, not rows.


Le 13/11/2018 à 12:21, Nicolas Krieger a écrit :


Hello,

I have a QTreeView with delegates for some rows, but not all rows.

I would like to unified the colors in the rows.

In the capture, there is only a delegate for the first column. I 
display informations the way I want, but I can not find the good way 
to display the background when the row is hovered or selected.


In the capture, the first row is hovered and the second one is selected.

I have tried using "highlight" or "lighter/darker" but it seems it is 
not the good options.


I know how to use the color for the background, but I don't know which 
color to use for the background of my delegate.


Any idea ?

--
*Nicolas Krieger*

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

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


[Interest] TreeView cells background color with delegate

2018-11-13 Thread Nicolas Krieger

Hello,

I have a QTreeView with delegates for some rows, but not all rows.

I would like to unified the colors in the rows.

In the capture, there is only a delegate for the first column. I display 
informations the way I want, but I can not find the good way to display 
the background when the row is hovered or selected.


In the capture, the first row is hovered and the second one is selected.

I have tried using "highlight" or "lighter/darker" but it seems it is 
not the good options.


I know how to use the color for the background, but I don't know which 
color to use for the background of my delegate.


Any idea ?

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


Re: [Interest] Qt3D QAbstractItemModel to watch QEntity's

2018-11-13 Thread Paul Lemire via Interest
Hi,

Have you looked into using the signals:

void QComponent::addedToEntity(QEntity *entity);

void QComponent::removedFromEntity(QEntity *entity);

That would be up to you to write a table you would update based on these
signals to keep track of which entities reference which components.

There's no public way of knowing when a component is added or removed
from a QEntity though that would be something trivial to add for 5.13 if
that can make your life easier.

There's no public API to get a QNode* form a QNodeId. Using the private
API QScene::lookupNode would indeed be an option but keep in mind it
could be removed, renamed ... in future versions (though unlikely). That
might be the quickest option to get you started.

Aspects don't get access to the frontend QNode, they only communicate
with QSceneChanges with ids. Usually aspect create a backend
representation of the QNode with only the data they care about and with
the changes and ids, these backend representations are kept in sync with
the frontend.

You could indeed have an aspect but would have to create backend
representations for QEntity and your custom QComponent I suppose, which
sounds like quite a bit of work for what you want to do.

Hopefully this may be of some help,

Paul

-- 
Paul Lemire | paul.lem...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel: France +33 (0)4 90 84 08 53, http://www.kdab.fr
KDAB - The Qt, C++ and OpenGL Experts




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


Re: [Interest] Qt3d and Webassembly

2018-11-13 Thread Morten Sørvig
> On 11 Nov 2018, at 15:56, Pierre Chicoine  wrote:
> 
> Is anyone working on getting Qt3d working on Webassembly, and, if so, any 
> idea of when it will be applied? 
> ___


Hi,

Qt3d makes good use of threads, which is not yet supported by Qt for 
Webassembly. So this is Qt 5.13 material at the earliest.

Morten



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