[Interest] QListView accessibility issue

2023-06-18 Thread Jean-Francois Dockes
Hi, I am trying to improve the accessibility of a Qt application (under MS Windows at the moment). The app uses a QListView to display a list of track titles. With both MS Narrator and NVDA, the titles are properly read when the mouse hovers the list entries (the model returns text with Qt::Ac

Re: [Interest] QListView moveRow() from model not called

2019-12-01 Thread Giuseppe D'Angelo via Interest
Il 01/12/19 23:07, Martin Marmsoler ha scritto: Why moveRows() is not called? Because moveRows was added in Qt 5.x, and drag and drop in Qt 4, and still uses insert+remove for backwards compatibility. Not the answer you were probably looking for... My 2 c, -- Giuseppe D'Angelo | giuseppe.d

[Interest] QListView moveRow() from model not called

2019-12-01 Thread Martin Marmsoler
I already postet the question here ( https://stackoverflow.com/questions/59130393/qlistview-moverow-from-model-not-called), but maybe it is better to write here. I'm having a Listview which should show a preview of an image. The model it self contains also the original image. In the listview it sh

[Interest] QListView - make tab key behave like enter key

2019-03-18 Thread Frank Rueter | OHUfx
Hi all, I have a simple QListView in which I would like to edit items by clicking into empty space, typing, then hitting either enter or tab. I’d like the tab Key_Tab event to behave exactly like Key_Enter event, but it’s a bit stubborn. When I hit tab while editing an item (i.e. editor is open

[Interest] QListView ignoring ScrollPerPixel on Sierra, High Sierra (Qt-5.12.0)

2019-02-17 Thread Patrick Stinson
Hi there! This simple pyqt example demonstrates the problem. Any ideas on a workaround? import time app = QApplication(sys.argv) w = QListView() m = QStringListModel() m.setStringList([str(time.time()) for i in range(1000)]) w.setModel(m) w.setVerticalScrollMode(QAbstractItemView.ScrollPerPixe

[Interest] QListView qss and delegates

2019-01-11 Thread Nicolas Krieger
Hi, I am using qss to change widgets appearance. I have a question about QListView using delegates. Is it possible to access colors defined in qss while painting in the delegate (method paint(QPainter * ipPainter, const QStyleOptionViewItem & iOption, const QModelIndex & iIndex) const) ? I

Re: [Interest] QListView with delegate: support drag outside of QApplication

2018-08-04 Thread Frank Rueter | OHUfx
For posterity, this is the solution: |import sys from PySide import QtGui, QtCore class MyModel(QtGui.QStandardItemModel): def __init__(self, w, parent=None): super(MyModel, self).__init__(parent) def mimeData(self, indexes): mimeData = super(MyModel, self).mimeData(indexes) mimeData.setText(

Re: [Interest] QListView with delegate: support drag outside of QApplication

2018-07-31 Thread Frank Rueter | OHUfx
Anybody? Been trying to play with the view's dragMoveEvent to take over the default drag event's mime data and create a custom QDrag instance with it, but that crashes. I also tried just adding test to the event's mime data, but that  has no effect. Maybe I do need to just re-implement the dra

[Interest] QListView with delegate: support drag outside of QApplication

2018-07-29 Thread Frank Rueter | OHUfx
Hi all, I have an app that uses two QListViews with delegates. The user can drag ad drop items from one view into the other to create something like a shopping list. So far so good. Now I need to enable the user to also drag an item out of the application entirely. Is it possible to access the

Re: [Interest] QListView: drag&drop custom item

2016-08-17 Thread André Somers
Op 16/08/2016 om 09:26 schreef Frank Rueter | OHUfx: Hi, I am trying to get drag&drop to work between two QListViews using a custom item. I can't find the info I need online other than this document which helped a little bit but now I'm s

Re: [Interest] QListView: drag&drop custom item

2016-08-17 Thread Frank Rueter | OHUfx
Thanks, but that still causes the default drag&drop behaviour to drop a QStandardItem rather than the subclassed custom item that was dragged. It's not the data that is the issue but the class type itself. I have now refactored my code to use QStdandardItem instead of a custom one which makes

Re: [Interest] QListView: drag&drop custom item

2016-08-17 Thread Viktor Engelmann
The QStandardItem seems to be used to limit the drag&drop to files, images, text etc. so that you can drag & drop from and to external applications (which is not possible for general objects). http://doc.qt.io/qt-4.8/qstandarditem.html#subclassing says you should subclass QStandardItem and overrid

Re: [Interest] QListView: drag&drop custom item

2016-08-16 Thread Frank Rueter | OHUfx
Anybody? I can find plenty of examples on how to drag items from a view to a widget but can't find anything about dragging a custom item from one view to another. Guess I will start to re-implement the entire drag&drop, maybe the solution will become apparent then. On 16/08/16 7:26 PM, Frank

[Interest] QListView: drag&drop custom item

2016-08-16 Thread Frank Rueter | OHUfx
Hi, I am trying to get drag&drop to work between two QListViews using a custom item. I can't find the info I need online other than this document which helped a little bit but now I'm stuck. Drag&drop from one QListView to another works fi

Re: [Interest] QListView

2015-08-27 Thread Igor Mironchik
Hi, i've found the solution. It was simple. The problem was in the next line setViewMode( QListView::IconMode ); On 27.08.2015 20:39, Igor Mironchik wrote: > Hi guys, > > I implemented model derived from QAbstractListModel. In data() method > for Qt::DecorationRole it returns QPixmap. This pixma

[Interest] QListView

2015-08-27 Thread Igor Mironchik
Hi guys, I implemented model derived from QAbstractListModel. In data() method for Qt::DecorationRole it returns QPixmap. This pixmap may be with different width, but always with the same height. In QListView I do: setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); setMinimumSize( 10

Re: [Interest] QListView Drag&Drop, QT 4.7

2013-09-17 Thread Alexander Syvak
QListView::viewport() should be used for installation of the filter. 2013/9/16 Alexander Syvak > Hello, > > using QListView I installed a filter which is printing all events' > received for the QListView object. > The > > setDragEnabled(true) > setAcceptDrops(true) > > were executed on the QLis

[Interest] QListView Drag&Drop, QT 4.7

2013-09-16 Thread Alexander Syvak
Hello, using QListView I installed a filter which is printing all events' received for the QListView object. The setDragEnabled(true) setAcceptDrops(true) were executed on the QListView object. At first there were DragEnter (60) events received. But after several app. executions there were no d

Re: [Interest] QListView and collapsing nodes

2012-05-08 Thread Andreas Pakulat
On Tue, May 8, 2012 at 5:03 PM, Jason Dictos wrote: > So I have this QTreeView class, which I populate the underlying model with > things at various times. I am struggling with an issue though that whenever > I update a particular QModelIndex, that level of nodes is collapsed by the > view.

[Interest] QListView and collapsing nodes

2012-05-08 Thread Jason Dictos
So I have this QTreeView class, which I populate the underlying model with things at various times. I am struggling with an issue though that whenever I update a particular QModelIndex, that level of nodes is collapsed by the view. The net effect is whenever a user refreshes an expanded node, th

[Interest] QListView and QStyledItemDelegate - item is greater than option rect, problems with painting

2012-04-06 Thread Kacper Banasik
Hello! I have a little problem with Qt… The problem is that my itemdelegate sizeHint() has greater width than listView (and therefore so is option), so there is a scrollbar. And now I don’t have any idea how to paint it. I managed to write something like this: QSize size(sizeHint(option, index));