Re: [Interest] QML ListView is not updated on model reset

2017-02-27 Thread Elvis Stansvik
Den 27 feb. 2017 11:27 em skrev "Alexander Dyagilev" : > > It seems the reason is that the model object is located in non-GUI thread... > > Is there a way to work around this? I would prefer to keep my model in non GUI thread. > > Is it a mandatory requirement to keep models in GUI thread only? I

Re: [Interest] https://www.qt.io/download/#Licence-anchor

2017-02-27 Thread Alexander Dyagilev
LOL :) There is a link on the site: Ready to start downloading. When one clicks on it - nothing is happening. Looks like a bug of the site. Furthermore, it worked earlier, as I remember... Now one has to answer all these questions to proceed to download... On 2/27/2017 4:42 AM, Patrick Stin

Re: [Interest] QML ListView is not updated on model reset

2017-02-27 Thread Alexander Dyagilev
Moving the model object to GUI thread fixed the problem. On 2/28/2017 1:27 AM, Alexander Dyagilev wrote: It seems the reason is that the model object is located in non-GUI thread... Is there a way to work around this? I would prefer to keep my model in non GUI thread. Is it a mandatory r

Re: [Interest] QML ListView is not updated on model reset

2017-02-27 Thread Alexander Dyagilev
It seems the reason is that the model object is located in non-GUI thread... Is there a way to work around this? I would prefer to keep my model in non GUI thread. Is it a mandatory requirement to keep models in GUI thread only? On 2/27/2017 8:59 PM, Alexander Dyagilev wrote: Hello, I'v

Re: [Interest] QML ListView is not updated on model reset

2017-02-27 Thread Alexander Dyagilev
Just checked it - nothing has changed. On 2/27/2017 9:11 PM, Elvis Stansvik wrote: This is just a wild guess, but could it be because you're using "id" for your role name, which is special in the QML world? Not sure how QML plays with that.. Elvis ___

Re: [Interest] QML ListView is not updated on model reset

2017-02-27 Thread Alexander Dyagilev
And I use the following code to update it: voidCorePlaylistsModel::refresh() { autoqstr=QString("SELECT*FROM%1"). arg(PlaylistsTable::tableName()); autoquery=m_db->database()->createQuery(qstr); verify(query.exec()); setQuery(query); } I.e. it's not even a reset of the model. But I get th

Re: [Interest] QML ListView is not updated on model reset

2017-02-27 Thread Alexander Dyagilev
Ooops... I was wrong... Not the same effect completely. ListView updates (i.e. new item is added), but all existed items damaged: all their model.id properties becomes 0. But the new item's model.id property is valid. On 2/27/2017 9:30 PM, Alexander Dyagilev wrote: And I use the following

Re: [Interest] QML ListView is not updated on model reset

2017-02-27 Thread Elvis Stansvik
2017-02-27 19:04 GMT+01:00 Alexander Dyagilev : > I have another ListView wich uses C++ model derived from another class - > QSqlQueryModel. > > The same things happens: model is not updated and existing items gets > damaged. E.g. model.id for an item was 2 and became 0 after a new item has > been

Re: [Interest] QML ListView is not updated on model reset

2017-02-27 Thread Alexander Dyagilev
I have another ListView wich uses C++ model derived from another class - QSqlQueryModel. The same things happens: model is not updated and existing items gets damaged. E.g. model.id for an item was 2 and became 0 after a new item has been added (all existing item's model.id becomes 0). Somet

[Interest] QML ListView is not updated on model reset

2017-02-27 Thread Alexander Dyagilev
Hello, I've created a question on SO but nobody answered still... (http://stackoverflow.com/questions/42468811/qml-listview-is-not-updated-on-model-reset) Qt 5.8, Windows 10. Quick Controls 2 application. In QML I have a ListView with a model derived from QAbstractListModel. In the model I h

[Interest] Elided QMenuItem

2017-02-27 Thread Etienne Sandré-Chardonnal
Dear all, I am writing a custom widget which is paint using QStyle MenuItem primitives. This works as expected. But I would like to elide the text. Is there any way to get the text rectangle width from QStyle primitives, taking into account the icon, margins and decorations? Thanks _

Re: [Interest] dragLeaveEvent never called & nested widget class

2017-02-27 Thread Etienne Sandré-Chardonnal
I figured out that recompiling the whole project fixed the issue when the class is inside the namespace. Somehow, the moc was not invoked properly, which caused the issue. 2017-02-27 10:17 GMT+01:00 Ch'Gans : > On 27 February 2017 at 22:06, Etienne Sandré-Chardonnal > wrote: > > Just to clarify,

Re: [Interest] 5.8.0 on OpenBSD 6.0

2017-02-27 Thread Marian Beermann
On 27.02.2017 07:22, Thiago Macieira wrote: > Em domingo, 26 de fevereiro de 2017, às 10:31:26 PST, > ml+qt-inter...@esmtp.org > escreveu: >> [Is this the right list for questions about compilation problems >> with Qt itself?] > > [yes] > >> Is that some error with eg++ (4.9.3)? >> How can this

Re: [Interest] dragLeaveEvent never called & nested widget class

2017-02-27 Thread Ch'Gans
On 27 February 2017 at 22:06, Etienne Sandré-Chardonnal wrote: > Just to clarify, ParameterWidget is a namespace, not a class. > > So putting a QWidget subclass inside a namespace did break dragLeaveEvent ... or your namespace breaks QWidget::dragLeaveEvent somehow. Chris > > 2017-02-27 10:04 G

Re: [Interest] dragLeaveEvent never called & nested widget class

2017-02-27 Thread Etienne Sandré-Chardonnal
Just to clarify, ParameterWidget is a namespace, not a class. So putting a QWidget subclass inside a namespace did break dragLeaveEvent 2017-02-27 10:04 GMT+01:00 Etienne Sandré-Chardonnal : > Dear all, > > I had a problem on a custom widget, where reimplemented dragEnterEvent and > dropEvent we

[Interest] dragLeaveEvent never called & nested widget class

2017-02-27 Thread Etienne Sandré-Chardonnal
Dear all, I had a problem on a custom widget, where reimplemented dragEnterEvent and dropEvent were properly called, but dragLeaveEvent was never called. The event handling function were reimplemented in a "LinkWidget" class, and then a ParameterWidget::LinkRefWidget was subclassing LinkWidget.