Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-08 Thread Frank Rueter | OHUfx

Hi Volker,

that doesn't sound like a bad idea at all I think, though I'm no QT 
expert myself.

I will try that tomorrow, thanks.



On 9/08/16 5:57 pm, Volker Siepmann wrote:

I'm quite new to qt, so please set me straight if this is nonsense:
Can you use the blockSignals(True) method once the event was called, 
so it doesn't try to open it multiple times as you continue hovering?
Then you need to catch the event of editor closing, so you can enable 
the signals again by blockSignals(False).

​


--
ohufxLogo 50x50 

*vfx for storytellers *

*vfx compositing  | 
*workflow customisation & consulting 
**


*W E L L I N G T O N|N E W   Z E A L A N D *

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


Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-08 Thread Volker Siepmann
I'm quite new to qt, so please set me straight if this is nonsense:
Can you use the blockSignals(True) method once the event was called, so it
doesn't try to open it multiple times as you continue hovering?
Then you need to catch the event of editor closing, so you can enable the
signals again by blockSignals(False).
​
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-08 Thread Frank Rueter | OHUfx

And one more follow up:
I just tried this in my view class:
def mouseMoveEvent(self, event):
'''Find item under mouse and pop it into edit mode'''
index = self.indexAt(event.pos())
self.edit(index)

This successfully pops the first item under the mouse into edit mode, 
but as I keep moving the cursor around I just get:

edit: editing failed

This one stumped me yesterday as well when I tried to use the Delegate's 
paint method to trigger it's editor on mouse over.


Does anybody have any ideas how to start editing on mouse over with 
delegates and list views?


Cheers,
frank



On 9/08/16 5:27 pm, Frank Rueter | OHUfx wrote:
Ok, so after some more experimenting I am fairly certain that using 
seItemWidget inside the delegate's paint event is a bad idea.
My second approach seems more promising so far: Using the custom movie 
player widget as the delegate's editor, even though I don't actually 
want to edit anything.
However, since I need the movie player to start playing on mouse over, 
I need to work out how to pop the item under the mouse into edit() 
mode (and finish editing when the mouse leaves the item).
After googling a bit it seems a few others have tried this but to no 
avail.


Any ideas on that one?

Cheers,
frank

On 8/08/16 4:28 pm, Frank Rueter | OHUfx wrote:

Hi Bo,

I have followed your advise and gone back to QListView with a delegate.
My first test was to render the custom widget I need via the delegate 
paint method. This populates a static version of the movie player 
(the custom widget I need).
Then, also in the delegate's paint method, I use setItemWidget if the 
mouse hovers over the item, to get the fully fledged and interactive 
widget.
This seems to be promising but it kinda feels wrong to set an item 
widget in the paint method. Should I worry?


Also, I can't get the rendered image to line up with the item widget 
itself. The render seems to have the correct size but the widget, 
when the mouse hovers over the item, is slightly off, causing the 
item to pop a little and leave out-of-date paint artifacts when the 
mouse leaves again.


Below is my test code for the delegate.

Now I am wondering if the below approach is acceptable (setting an 
item widget inside the delegate's paint event).
Alternatively I'm wondering if I could/should use the delegate's 
createEditor method to display the widgets of all visible items to 
achieve the same thing (which is full interactive and animated widget 
in all visible items). I have, however, not been able to figure out 
how to call the editor on mouse enter, which I need because the movie 
is supposed to play when the mouse hovers over it.


Any opinions on this?

Cheers,
frank


class DelegateOld(QtGui.QItemDelegate):

def __init__(self, parent = None):

super(Delegate, self).__init__(parent)
self.thumbnail = None

def paint(self, painter, option, index):
item = index.model().itemFromIndex(index)
self.thumbnail = MyMovie(item)

if option.state & QtGui.QStyle.State_MouseOver:
# swap render for actual widget here. So the user can 
interact with it - doesn't feel right though to do this in the paint 
event

existingThumb = self.view.indexWidget(index)
if not existingThumb:
self.view.setIndexWidget(index, self.thumbnail)
else:
self.thumbnail.render(painter, 
QtCore.QPoint(option.rect.x(), option.rect.y()))


def sizeHint(self, option, index):
return MyMovie.thumbSize

On 4/08/16 8:36 pm, Bo Thorsen wrote:

Den 04-08-2016 kl. 10:05 skrev Frank Rueter | OHUfx:

I am playing with the idea of writing a custom widget based on
QScrollArea, where widgets are created as the user scrolls.
I'm just hoping to bounce the general idea of you guys here to see if
I'm heading in the right direction:

I have a heap of custom widgets, potentially thousands, depending 
on the

contents of a database.
I'd like to show them in a grid that fits as many widgets horizontally
as will fit in the current window size (dynamic).
I would also like smooth vertical scrolling.

If I create a single parent widget with a grid layout that creates all
widgets on start up, it takes ages.
So I'm thinking if I use the child widgets' visibleRegion() to find 
the

ones currently visible in the scroll area, then figure out the indexes
of the widgets in the rows above and below to create them dynamically,
that should speed up the startup and still provide smooth scrolling.

Obviously I'd have to manually scale the scroll area based on the
maximum amount of widgets and the parent widget's width to get an
indicative scrollbar.
Not sure how tricky that will be.

Does that sound crazy or doable?

Basically I am trying to re-create the behavior of a QListView in icon
mode. I tried using QListView with delegates, but couldn't get the
delegates to provide the kind of complexity I need for the child 
widgets

which I have already writ

Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-08 Thread Frank Rueter | OHUfx
Ok, so after some more experimenting I am fairly certain that using 
seItemWidget inside the delegate's paint event is a bad idea.
My second approach seems more promising so far: Using the custom movie 
player widget as the delegate's editor, even though I don't actually 
want to edit anything.
However, since I need the movie player to start playing on mouse over, I 
need to work out how to pop the item under the mouse into edit() mode 
(and finish editing when the mouse leaves the item).

After googling a bit it seems a few others have tried this but to no avail.

Any ideas on that one?

Cheers,
frank

On 8/08/16 4:28 pm, Frank Rueter | OHUfx wrote:

Hi Bo,

I have followed your advise and gone back to QListView with a delegate.
My first test was to render the custom widget I need via the delegate 
paint method. This populates a static version of the movie player (the 
custom widget I need).
Then, also in the delegate's paint method, I use setItemWidget if the 
mouse hovers over the item, to get the fully fledged and interactive 
widget.
This seems to be promising but it kinda feels wrong to set an item 
widget in the paint method. Should I worry?


Also, I can't get the rendered image to line up with the item widget 
itself. The render seems to have the correct size but the widget, when 
the mouse hovers over the item, is slightly off, causing the item to 
pop a little and leave out-of-date paint artifacts when the mouse 
leaves again.


Below is my test code for the delegate.

Now I am wondering if the below approach is acceptable (setting an 
item widget inside the delegate's paint event).
Alternatively I'm wondering if I could/should use the delegate's 
createEditor method to display the widgets of all visible items to 
achieve the same thing (which is full interactive and animated widget 
in all visible items). I have, however, not been able to figure out 
how to call the editor on mouse enter, which I need because the movie 
is supposed to play when the mouse hovers over it.


Any opinions on this?

Cheers,
frank


class DelegateOld(QtGui.QItemDelegate):

def __init__(self, parent = None):

super(Delegate, self).__init__(parent)
self.thumbnail = None

def paint(self, painter, option, index):
item = index.model().itemFromIndex(index)
self.thumbnail = MyMovie(item)

if option.state & QtGui.QStyle.State_MouseOver:
# swap render for actual widget here. So the user can 
interact with it - doesn't feel right though to do this in the paint event

existingThumb = self.view.indexWidget(index)
if not existingThumb:
self.view.setIndexWidget(index, self.thumbnail)
else:
self.thumbnail.render(painter, 
QtCore.QPoint(option.rect.x(), option.rect.y()))


def sizeHint(self, option, index):
return MyMovie.thumbSize

On 4/08/16 8:36 pm, Bo Thorsen wrote:

Den 04-08-2016 kl. 10:05 skrev Frank Rueter | OHUfx:

I am playing with the idea of writing a custom widget based on
QScrollArea, where widgets are created as the user scrolls.
I'm just hoping to bounce the general idea of you guys here to see if
I'm heading in the right direction:

I have a heap of custom widgets, potentially thousands, depending on 
the

contents of a database.
I'd like to show them in a grid that fits as many widgets horizontally
as will fit in the current window size (dynamic).
I would also like smooth vertical scrolling.

If I create a single parent widget with a grid layout that creates all
widgets on start up, it takes ages.
So I'm thinking if I use the child widgets' visibleRegion() to find the
ones currently visible in the scroll area, then figure out the indexes
of the widgets in the rows above and below to create them dynamically,
that should speed up the startup and still provide smooth scrolling.

Obviously I'd have to manually scale the scroll area based on the
maximum amount of widgets and the parent widget's width to get an
indicative scrollbar.
Not sure how tricky that will be.

Does that sound crazy or doable?

Basically I am trying to re-create the behavior of a QListView in icon
mode. I tried using QListView with delegates, but couldn't get the
delegates to provide the kind of complexity I need for the child 
widgets

which I have already written (which are basically mini movie players
that can be drag&dropped and have playback all at once on demand).

Any thoughts on this before I dive into this little experiment?


I don't think that sounds unreasonable. If I were you, I would try 
very hard to stay with QListView instead, but other than that it 
doesn't sound hard to do. Time consuming, yes, but not difficult.


Bo Thorsen,
Director, Viking Software.



--
ohufxLogo 50x50 

*vfx for storytellers *

*vfx compositing  | 
*workflow customisation & consulting 
**


*W

Re: [Interest] best qt class to use to detect line/polygon/region collision

2016-08-08 Thread maitai

Thanks Ch'Gans for replying.

The lines do not have a width. I thought about QGraphicsScene which I 
use already but it does seems to be too much for that (plus memory 
consumption is an issue as well).


To give a bit mode details: The list of lines does not change during 
calculation, it changes only when the user moves the view, but remain as 
it is during calculation. I don't need the crossing point, and I don't 
need the number of lines that crosses. If it crosses once I break. No 
bezier curves or fancy things, just lines. Most of these lines form a 
closed polygon that I can detect and manipulate as such, but some other 
are just single lines (or non-closed polygons) not connected to anything 
else.


The number of lines in the list can vary from 0 to around 50k, it 
depends. I already divide the set of lines in subsets (square cells) and 
before I go iterate on the list of lines in a cell, I check that the 
line is crossing (or is inside) the cell. I have then improved a bit by 
using a QPainterPath to determine the boundingRect of the lines within a 
cell which I use instead of the cell borders. A bit better, but not that 
much. The size of cells is also difficult to tune (more cells with less 
lines, or the opposite?).


Since my first mail I have also tried to give some thickness to the line 
and use QPainterPath::intersects(). The result is much slower than 
simply iterating on the list of lines, at least 1000 times slower (and 
cpu is going crazy). I was also considering using QRegion but I suppose 
the result will be similar.


I will have a look at CGAL Minkowski 2D algorithms, and will also try 
the elegant solution with a QMap provided by Henry in the other reply.


Thanks to you both,
Philippe


Le 09-08-2016 03:07, Ch'Gans a écrit :

On 9 August 2016 at 04:05, maitai  wrote:

Hello all,

I have a list of lines (QLineF) in 2D space. Some might represent a 
closed
polygon, some others are just a line or represent a non closed 
polygon.
Classical problem: I need to detect if another given line is crossing 
one of
the lines in the list. I don't need the crossing point, just to know 
if it

crosses or not.


Do your lines have a width? or are they "ideal" lines (0 thickness)?
If you need to deal with outline/shape stroking, then you might
consider using QGraphicsScene.
This might look a bit too much at first, but maybe in the long run
this can save you lot of time depending on you spatial query use
cases.
Just check 
http://doc.qt.io/qt-5/qtwidgets-graphicsview-chip-example.html

if you never tried before.

Fore more "advanced" geometry approach, you could have a look at cgal
(eg: 2D arrangements)
http://doc.cgal.org/latest/Manual/packages.html#PkgArrangement2Summary

If you find yourself falling short with QPainterPath and
QPainterPathStroker, maybe CGAL Minkowski sums and polygon offsetting
is what you're after
http://doc.cgal.org/latest/Manual/packages.html#PkgMinkowskiSum2Summary
http://doc.cgal.org/latest/Manual/packages.html#PkgStraightSkeleton2Summary


For the time being, I just iterate on the list and use 
QLineF::intersects().

This is of course badly slow.

I read that post (and many others):
http://stackoverflow.com/questions/9393672/intersection-point-of-qpainterpath-and-line-find-qpainterpath-y-by-x

Using a QPainterPath seems the right idea, but as it seems it does not 
work
with a single line, so maybe I should convert the line in a tiny 
rectangle

to be able to use QPainterPath::intersects(). Will that be faster?


Yeah, that's where you realise the "Painter" role in "QPainterPath".
QPainterPath is definitely tailored to address Qt painting needs.
Plus beware of instability with QPainterPath if you use bezier curves
and circular arcs (implemented internally as bezier curves). Again it
might be OK when your job is painting, but it is not OK if your job is
"geometry solving with precision"

Before I try that, I was wondering if someone has a better idea as of 
what
class to use in qt to solve this? Calculation speed is the most 
important

thing in my case.


Maybe gives more details about your application:
How many line-segments are you talking about, hundreds, thousands, 
millions?

What is the likeliness of intersection?
Are the line static or are they moving? How often the spatial
configuration changes?
How often you need to query the arrangement?
Do you need to detect *every* intersection at *any* moment, or within
an "area of interest" during a "time span of interest:, ... ?


Chris



Thanks for pointing me in the right direction
Philippe Lelong
___
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] QQueue::enqueue hangs in QList::append

2016-08-08 Thread Ch'Gans
On 9 August 2016 at 05:09, Nilesh Kokane  wrote:
> On Aug 8, 2016 9:06 PM, "Thiago Macieira"  wrote:
>>
>> On segunda-feira, 8 de agosto de 2016 20:11:38 PDT Nilesh Kokane wrote:
>> > Hello,
>> >
>> > I've a QQueue designed for threadsafe as[1]. I push to the QQueue from
>> > one thread and pop from the other. After several attempts it hangs in
>> > QList::append near  node_construct(n, t).
>> >
>> > [1]. https://paste.kde.org/p85706xzb

Your implementation looks a bit weird to me, what about simply (not tested):

ThreadSafeQueue()
{
}

~ThreadSafeQueue()
{
}

T pop()
{
 QMutexLocker locker(&mutex);
 if (queue.isEmpty())
  bufferNotEmpty.wait(&mutex);
 return queue.unqueue();
}

push(T)
{
 QMutexLocker locker(&mutex);
 queue.enqueue(t);
 bufferNotEmpty.wakeAll();
}

isEmpty() // I doubt this will achieve what you're after, maybe you're
after the notEmpty/notFull dual wait condition pattern [1]
{
 QMutexLocker locker(&mutex);
 return queue.isEmpty();
}

clear()
{
 QMutexLocker locker(&mutex);
 queue.clear();
}

And you could optimise a bit if you have several readers by using a
QReadWriteLock instead of QMutex

My 2 cents.
Chris

[1] eg. 
https://www.cs.mtu.edu/~shene/NSF-3/e-Book/MONITOR/ProducerConsumer-1/MON-example-buffer-1.html

>> >
>> > Any clue?
>>
>> node_construct can't hang. Your trace is wrong, that's not where it hung.
>
> http://picpaste.com/queue-Xsj4G4h8.png . This is what I get in stack trace.
>
> --
>  Nilesh Kokane
>
>
> ___
> 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] best qt class to use to detect line/polygon/region collision

2016-08-08 Thread Ch'Gans
On 9 August 2016 at 04:05, maitai  wrote:
> Hello all,
>
> I have a list of lines (QLineF) in 2D space. Some might represent a closed
> polygon, some others are just a line or represent a non closed polygon.
> Classical problem: I need to detect if another given line is crossing one of
> the lines in the list. I don't need the crossing point, just to know if it
> crosses or not.

Do your lines have a width? or are they "ideal" lines (0 thickness)?
If you need to deal with outline/shape stroking, then you might
consider using QGraphicsScene.
This might look a bit too much at first, but maybe in the long run
this can save you lot of time depending on you spatial query use
cases.
Just check http://doc.qt.io/qt-5/qtwidgets-graphicsview-chip-example.html
if you never tried before.

Fore more "advanced" geometry approach, you could have a look at cgal
(eg: 2D arrangements)
http://doc.cgal.org/latest/Manual/packages.html#PkgArrangement2Summary

If you find yourself falling short with QPainterPath and
QPainterPathStroker, maybe CGAL Minkowski sums and polygon offsetting
is what you're after
http://doc.cgal.org/latest/Manual/packages.html#PkgMinkowskiSum2Summary
http://doc.cgal.org/latest/Manual/packages.html#PkgStraightSkeleton2Summary


> For the time being, I just iterate on the list and use QLineF::intersects().
> This is of course badly slow.
>
> I read that post (and many others):
> http://stackoverflow.com/questions/9393672/intersection-point-of-qpainterpath-and-line-find-qpainterpath-y-by-x
>
> Using a QPainterPath seems the right idea, but as it seems it does not work
> with a single line, so maybe I should convert the line in a tiny rectangle
> to be able to use QPainterPath::intersects(). Will that be faster?

Yeah, that's where you realise the "Painter" role in "QPainterPath".
QPainterPath is definitely tailored to address Qt painting needs.
Plus beware of instability with QPainterPath if you use bezier curves
and circular arcs (implemented internally as bezier curves). Again it
might be OK when your job is painting, but it is not OK if your job is
"geometry solving with precision"

> Before I try that, I was wondering if someone has a better idea as of what
> class to use in qt to solve this? Calculation speed is the most important
> thing in my case.

Maybe gives more details about your application:
How many line-segments are you talking about, hundreds, thousands, millions?
What is the likeliness of intersection?
Are the line static or are they moving? How often the spatial
configuration changes?
How often you need to query the arrangement?
Do you need to detect *every* intersection at *any* moment, or within
an "area of interest" during a "time span of interest:, ... ?


Chris

>
> Thanks for pointing me in the right direction
> Philippe Lelong
> ___
> 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] best qt class to use to detect line/polygon/region collision

2016-08-08 Thread Henry Skoglund

On 2016-08-08 18:05, maitai wrote:

Hello all,

I have a list of lines (QLineF) in 2D space. Some might represent a
closed polygon, some others are just a line or represent a non closed
polygon. Classical problem: I need to detect if another given line is
crossing one of the lines in the list. I don't need the crossing point,
just to know if it crosses or not.

For the time being, I just iterate on the list and use
QLineF::intersects(). This is of course badly slow.

I read that post (and many others):
http://stackoverflow.com/questions/9393672/intersection-point-of-qpainterpath-and-line-find-qpainterpath-y-by-x


Using a QPainterPath seems the right idea, but as it seems it does not
work with a single line, so maybe I should convert the line in a tiny
rectangle to be able to use QPainterPath::intersects(). Will that be
faster?

Before I try that, I was wondering if someone has a better idea as of
what class to use in qt to solve this? Calculation speed is the most
important thing in my case.

Thanks for pointing me in the right direction
Philippe Lelong


Isn't this some kind of sorting problem in disguise? You could try 
sorting the coords of the lines in your list to speed up the processing. 
I made a simple example using a QMap:

-
// make list of QLineFs
QList lLines;
for (int i = 0; (i < 100); ++i)
{
QLineF l(rand() / 100.0,rand() / 100.0,rand() / 100.0,rand() / 
100.0);


// make sure dx is positive (x1 <= x2)
if (l.x1() > l.x2())
// if not swap the points
l = QLineF(l.p2(),l.p1());

lLines.append(l);
}

// insert all x1 coords (and their position in the list) in a map
QMap mx1;
for (int i = 0; (i < lLines.count()); ++i)
mx1.insertMulti(lLines[i].x1(),i);

// make another list of QLineFs to test with
QList lTest;
for (int i = 0; (i < 20); ++i)
{
QLineF l(rand() / 100.0,rand() / 100.0,rand() / 100.0,rand() / 
100.0);


// make sure dx is positive (x1 <= x2)
if (l.x1() > l.x2())
// if not swap the points
l = QLineF(l.p2(),l.p1());

lTest.append(l);
}

// test simple way
int crossings1 = 0;
for (auto t : lTest)
for (auto l : lLines)
if (QLineF::BoundedIntersection == l.intersect(t,nullptr))
++crossings1;

// test with map
int crossings2 = 0;
for (auto t : lTest)
{
auto iUpper = mx1.upperBound(t.x2());
auto i = mx1.begin();
while (i != iUpper)
{
auto l = lLines[i.value()];
if (QLineF::BoundedIntersection == l.intersect(t,nullptr))
++crossings2;

++i;
}
}

// crossings1 == crossings2
-

Random access in the list from the values in QMap well not yield so good 
performance, the QlineFs should be stored in a vector instead.


Perhaps a next step could be to do a similar QMap sorting of the .x2() 
coords and do a .lowerbound(t.x1()) stepping down and then also sort the 
y coords. But I need more coffee to understand that right now..


Rgrds Henry


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


Re: [Interest] QQueue::enqueue hangs in QList::append

2016-08-08 Thread Nilesh Kokane
On Aug 8, 2016 9:06 PM, "Thiago Macieira"  wrote:
>
> On segunda-feira, 8 de agosto de 2016 20:11:38 PDT Nilesh Kokane wrote:
> > Hello,
> >
> > I've a QQueue designed for threadsafe as[1]. I push to the QQueue from
> > one thread and pop from the other. After several attempts it hangs in
> > QList::append near  node_construct(n, t).
> >
> > [1]. https://paste.kde.org/p85706xzb
> >
> > Any clue?
>
> node_construct can't hang. Your trace is wrong, that's not where it hung.

http://picpaste.com/queue-Xsj4G4h8.png . This is what I get in stack trace.

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


[Interest] best qt class to use to detect line/polygon/region collision

2016-08-08 Thread maitai

Hello all,

I have a list of lines (QLineF) in 2D space. Some might represent a 
closed polygon, some others are just a line or represent a non closed 
polygon. Classical problem: I need to detect if another given line is 
crossing one of the lines in the list. I don't need the crossing point, 
just to know if it crosses or not.


For the time being, I just iterate on the list and use 
QLineF::intersects(). This is of course badly slow.


I read that post (and many others): 
http://stackoverflow.com/questions/9393672/intersection-point-of-qpainterpath-and-line-find-qpainterpath-y-by-x


Using a QPainterPath seems the right idea, but as it seems it does not 
work with a single line, so maybe I should convert the line in a tiny 
rectangle to be able to use QPainterPath::intersects(). Will that be 
faster?


Before I try that, I was wondering if someone has a better idea as of 
what class to use in qt to solve this? Calculation speed is the most 
important thing in my case.


Thanks for pointing me in the right direction
Philippe Lelong
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] High-DPI scaling of QQuickItem-derived class

2016-08-08 Thread Artem Fedoskin
Hello,

I use QtQuickControls 2 together with QQuickItem-derived class in my app.
After I set AA_EnableHighDpiScaling attribute and all QQuickControls 2
components look correctly on my smartphone but object of my custom class is
scaled incorrectly. Here is the app without HighDpi scaling with minimum
zoom(the way it is meant to work):

http://pasteboard.co/6dmRQpVaZ.png

And here is the one with scaling with minimum zoom:

http://pasteboard.co/CxdoQ7rr.png

It seems that on the second screen the object is scaled too much and I can
see square pixels of all textures that I draw with QPixmap or QImage.
However, the images that I load from external memory and nodes like
QSGGeometryNode look correct. Could someone tell me what is the problem?
Can I switch off scaling for just one particular QQuickItem? If no, what
should I set to render it correctly?

Also, when I try to set opacity on QQuickItem with a lot of QSGOpacityNodes
in scene graph node tree I get segmentation fault. What can cause this?

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


Re: [Interest] QQueue::enqueue hangs in QList::append

2016-08-08 Thread Thiago Macieira
On segunda-feira, 8 de agosto de 2016 20:11:38 PDT Nilesh Kokane wrote:
> Hello,
> 
> I've a QQueue designed for threadsafe as[1]. I push to the QQueue from
> one thread and pop from the other. After several attempts it hangs in
> QList::append near  node_construct(n, t).
> 
> [1]. https://paste.kde.org/p85706xzb
> 
> Any clue?

node_construct can't hang. Your trace is wrong, that's not where it hung.

-- 
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] QQueue::enqueue hangs in QList::append

2016-08-08 Thread Nilesh Kokane
Hello,

I've a QQueue designed for threadsafe as[1]. I push to the QQueue from
one thread and pop from the other. After several attempts it hangs in
QList::append near  node_construct(n, t).

[1]. https://paste.kde.org/p85706xzb

Any clue?


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