We're seeing a change in behavior in the latest PyQt4.
We have a custom QStandardItemModel with custom QStandardItems. It is being
used by a QTreeView.
When calling tree.invisibleRootItem().child(i) we are getting back
QtGui.QStandardItem instances instead of our custom classes.
This seemed
David Aguilar davvid at gmail.com writes:
We're seeing a change in behavior in the latest PyQt4.
We have a custom QStandardItemModel with custom QStandardItems. It is being
used by a QTreeView.
When calling tree.invisibleRootItem().child(i) we are getting back
QtGui.QStandardItem
Phil Thompson phil at riverbankcomputing.com writes:
On Mon, 29 Apr 2013 20:41:46 + (UTC), David Aguilar davvid at
gmail.com
wrote:
We're seeing a change in behavior in the latest PyQt4.
When calling tree.invisibleRootItem().child(i) we are getting back
QtGui.QStandardItem instances
hey guys!
I'm pretty fresh to this mailing list, but looking forward to being
pointed in the right direction!
So here's what's happening. I'm implementing a custom QTreeView model,
and though I have it working pretty well, the one little peeve I
haven't figured out is the way it handles
Hi,
On Fri, Oct 5, 2012 at 12:20 AM, Jordan Olson jorxs...@gmail.com wrote:
So here's what's happening. I'm implementing a custom QTreeView model,
and though I have it working pretty well, the one little peeve I
haven't figured out is the way it handles selection-
--any default
Ah, cheers Andreas, figured it out!
I was setting it to
self.treeWidget.setSelectionMode( QAbstractItemView.MultiSelection )
but what I really wanted was
self.treeWidget.setSelectionMode( QAbstractItemView.ExtendedSelection )
thanks again!
On Fri, Oct 5, 2012 at 11:46 AM, Andreas Pakulat
This is a zip file of the Exlipse project if anyone cares to take a look. At
this point I am trying to figure out why the dragEnterEvent in
compassTreeView.py doesn't cause a move action when source is self.
http://python.6.n6.nabble.com/file/n4931964/CompassGui.zip CompassGui.zip
--
View this
No problem, Bart. Thanks for replying. I think I am on the right track (a
right track) now. There seems to be many different ways to do what I am
trying to accomplish, but I haven't gotten the hang of quickly figuring out
the documentation and I am running out of time on this project. I think it
When time is short I would say, add a method to the source model that you can
call from the target model that removes the received items. That would make it
work at least. It might even be the best way to do such a thing, but I'm not
sure.
It seems you handle the dragged in mimedata as the
Sorry it took me so long, I was quite busy.
My solution is used for moving items internally in one model. From your
earlier mails I may have gotten the wrong idea. It seems you need to move the
items from one model to another. Is this correct?
Am I correct in assuming that your source model is
More progress. I now have the two MineData types working so that a node
dropped into the target tree is created with a different MIME_TYPE and in
the dopMimeData method of the target model I have at the bottom:
. . .
if (mimedata.hasFormat('target_type')):
self.removeRow(row,parentIndex)
It
I may be talking to myself only, but I am getting closer. I subclassed two
models with different MimeData subclasses of QMimeData giving them different
MIME_TYPE strings. I created two instances of QTreeView, one with each of
the models. One of the models (say model B) is set to accept both of
In my project I use a special mime type in DropMimeData() to recognise
internal moves and handle them accordingly. I have set the view to handle drag
and drop operations. You will need to subclass your model for this.
___
PyQt mailing list
hosscomp wrote
I am looking at the documentation for QAbstractItemView Class. I have
created a tree view and I would like it to accept drops from a different
view, but also be able to move items within itself. None of the
DragDropMode settings seem to allow that. If I set it to
I am looking at the documentation for QAbstractItemView Class. I have created
a tree view and I would like it to accept drops from a different view, but also
be able to move items within itself. None of the DragDropMode settings seem to
allow that. If I set it to InternalMove it acts the way
Hi. Want an image (QPixmap) as background of my QTreeView fixed in the
lower right corner of the viewport at all times. Did this for a QTableView
by installing an event filter and drawing the pixmap when I receive Paint
events on the viewport. This doesn't seem to work for the QTreeView,
On Wed, 1 Jun 2011 10:46:42 -0700, emmanuel_mayssat wrote:
I have an application that run a sequence of tasks listed in a treeview.
There is a run button.
When the run button is pressed, it executes all the task in the subtree.
Now, when the application open, it is not really clear what the
Hello,
I have an application that run a sequence of tasks listed in a treeview.
There is a run button.
When the run button is pressed, it executes all the task in the subtree.
Now, when the application open, it is not really clear what the run button
would execute, because the line cursor in
Howdy,
Anybody have any experiences or words of wisdom to share concerning how to
have a QTreeView/QFileSystemModel automatically expand from entirely closed (on
startup)
to a certain specified directory ?
Was hoping for a single command,...but preliminary research looks like a
recursive
Hi All,
I have a Qtreeview with a QSortFilterProxyModel for filtering and sorting.
I want to sort the data on more ways than there are columns visible.
In order to do that I have the data to sort on in invisible columns adn
a QButtonGroup to set the sorting column with
Hi Everyone
So I'm trying to filter a QFileSystemModel using QSortFilterProxyModel and
displaying it with QTreeView. The filtering works fine, however, I'm having
trouble setting the root index to the folder I want. To set the root index
for QTreeView, I use:
someTreeView.setRootIndex(
Hello,
I have subclassed QAbstractTableModel. I have define my data method
correctly. However, I would like to get a kind of hidden information when
I double clicked on the view associated to my model (which is a qtreeview).
Hence, I have decided to use Qt.AccessibleDescriptionRole.
def
Steve Borho wrote:
Hello,
We use a QTreeView to present a list of files in our commit tool. The
view has 4 columns, the largest of which is the file name. We don't
really like Qt's behavior of scrolling horizontally when an item is
selected, most of the time the user wants column 0
So this is what I did:
class TreeWidget(QTreeWidgetItem):
def __init__(self, parent=None):
QTreeWidgetItem.__init__(self, parent)
def key(self, col, asc):
print col
if col == 4:
path = self.text(col).latin1()
if path is not None and
On Thu, Nov 18, 2010 at 11:00 AM, dizou di_...@yahoo.com wrote:
So this is what I did:
class TreeWidget(QTreeWidgetItem):
def __init__(self, parent=None):
QTreeWidgetItem.__init__(self, parent)
def key(self, col, asc):
print col
if col == 4:
path =
@riverbankcomputing.com
Sent: Thu, November 18, 2010 9:07:13 AM
Subject: Re: [PyQt] QTreeView and sorting
I said 'QListViewItem' reimplemented as 'QListViewItemXX', but you
must insert items with 'QListViewItemXX' on 'QTreeView'.
--
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net
On Thu, Nov 18, 2010 at 11:18 AM, Di Zou di_...@yahoo.com wrote:
There is no QListViewItem, so I used QListWidgetItem. I cannot insert those
into my QTreeView though and I am not going to turn my QTreeView into a
QListView.
You said 'I am using a QTreeView'. Check the first message.
--
On Thu, Nov 18, 2010 at 11:18 AM, Di Zou di_...@yahoo.com wrote:
There is no QListViewItem, so I used QListWidgetItem. I cannot insert those
into my QTreeView though and I am not going to turn my QTreeView into a
QListView.
Sorry, QListViewItem is a QT3 object.
--
Reinaldo de Carvalho
Op den Middeweken 17 November 2010 Klock 17:42:20 hett dizou schreven:
I am using a QTreeView and I have sorting enabled. Sorting works great, but
I want one column to be sorted a specific way that isn't how Qt does it by
default. I took a look at QSortFilterProxyModel, but this class looks
Sorry. I meant I am using a QTreeWidget and QTreeWidgetItems.
From: Reinaldo de Carvalho reinal...@gmail.com
To: Di Zou di_...@yahoo.com
Cc: pyqt@riverbankcomputing.com
Sent: Thu, November 18, 2010 9:22:37 AM
Subject: Re: [PyQt] QTreeView and sorting
On Thu
I am using a QTreeView and I have sorting enabled. Sorting works great, but I
want one column to be sorted a specific way that isn't how Qt does it by
default. I took a look at QSortFilterProxyModel, but this class looks more
like a way to sort and filter data before the data is displayed in the
On Wed, Nov 17, 2010 at 1:42 PM, dizou di_...@yahoo.com wrote:
I am using a QTreeView and I have sorting enabled. Sorting works great, but I
want one column to be sorted a specific way that isn't how Qt does it by
default. I took a look at QSortFilterProxyModel, but this class looks more
like
Hello i can use qtreeview with qtftp (there is some model ready) or i have to
use qtreewidget with qftp?
Thanks
Luca
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Dear all,
I am trying to use a Python list as a model for QTreeView, or to be precise,
the model is a subclass of list, the
daughter nodes are the elements on this list object, and they themselves are
the same subclass of list.
Somehow I cannot get the data to show correctly. Only the first
On Mon May 31 02:15:32 BST 2010, Jon Noble wrote:
Hope this helps someone as PyQt4 documentation/examples are sparse out
there in the internet.
I encourage you to add it to the Item Views section of the Sample Code page
on the Wiki:
http://www.diotavelli.net/PyQtWiki/SampleCode
Hopefully
On Monday 31 May 2010 16:55:29 David Boddie wrote:
On Mon May 31 02:15:32 BST 2010, Jon Noble wrote:
Hope this helps someone as PyQt4 documentation/examples are sparse out
there in the internet.
I encourage you to add it to the Item Views section of the Sample Code page
on the Wiki:
Hi,
I'm trying to create a file-system tree-view with checkboxes yet i'm having
great difficulties on doing so.
I found a link (http://lists.trolltech.com/qt-interest/2005-08/msg00516.html)
but I'm not really sure what the solution is. I've tried one solution which is
to use
On Monday 31 May 2010 00:07:43 Jon Noble wrote:
Hi,
I'm trying to create a file-system tree-view with checkboxes yet i'm having
great difficulties on doing so.
I found a link
(http://lists.trolltech.com/qt-interest/2005-08/msg00516.html) but I'm not
really sure what the solution is. I've
On Monday 31 May 2010 01:10:12 Jon Noble wrote:
On Monday 31 May 2010 00:07:43 Jon Noble wrote:
Hi,
I'm trying to create a file-system tree-view with checkboxes yet i'm
having great difficulties on doing so.
I found a link
Hi,
I would like add Tooltip to a QtreeView.
I have reimplemented the event fonction for MyTreeView class
And surprise: MyTreeView.indexAt() function doesn't return the good row.
Could you tell me what is wrong in my code?
For the test I have modified the simpletreemodel.pyw in samples who
How do I set the drop target in my QTreeView to be between any row in Column 1?
To set the drop target to be between rows, I have flags return
ItemIsDropEnabled if the index is invalid. However, an invalid index
has both the row and column set to -1. That prevents me from narrowing
the drop
:05 PM
Subject: Re: [PyQt] qtreeview vs qtreewidget?
Ok, I figured out how to allow checkboxes in a qtreeview (using flags()) and
how to set their state using QtCore.Qt.CheckStateRole in my data() method.
However, I still need help on one thing:
What is the signal that lets me know if someone
If you were to post an example I for one would find it helpful and I'm sure
others would as well.
Thanks,
Chris
--- On Wed, 10/21/09, William abecedarian314...@yahoo.com wrote:
From: William abecedarian314...@yahoo.com
Subject: Re: [PyQt] qtreeview vs qtreewidget?
To: William abecedarian314
A quick question--in the qtreewidget, one can make a checkbox for items (setting
CheckState for a treewidget item). Is there a similar capability for the
qtreeview if we are using qabstractitemmodel?
Thanks!
___
PyQt mailing list
that, then I can change my data and I assume that the view will
update.
Thanks,
William
From: William abecedarian314...@yahoo.com
To: pyqt@riverbankcomputing.com
Sent: Tue, October 20, 2009 6:09:46 PM
Subject: [PyQt] qtreeview vs qtreewidget?
A quick question
No one has any ideas on this? Basically on Windows it does not pick up
the size of a cell when using QTableView.setIndexWidget whereas it works
on linux...
Cheers
On 28/05/09 15:12, Peter Georges wrote:
I have a QTreeView with custom widgets in it and I use the
'resizeColumnsToContents' and
I have a QTreeView with custom widgets in it and I use the
'resizeColumnsToContents' and 'resizeRowsToContents' functions to
correctly size all the cells. This works correctly on Linux but not on
Windows.. I am using v4.5-snapshot-20090409 which is a bit old now but I
cannot see anything in
I have a following situation: there is a tree simple tree view with
some folder-like structure. Any object may be chosen from this view or
not. If anything is chosen, then the dialog returns the chosen index's
internal pointer and if nothing was chosen it should return None.
Except it doesn't.
Hi,
I'm trying to creating something akin to an phonebook. For a given
person, there are possibly two phone numbers listed (say work and
cell). What I'm trying to implement is single model (PhoneModel) and
two different views (WorkView and CellView). My initial thought was
that I should use two
Hi Matt,
Thanks for your response, I'm using Qt 4.2.
cheers
Babak
On 04/02/2008, Matt Newell [EMAIL PROTECTED] wrote:
On Monday 04 February 2008 08:52:44 Baba-k wrote:
Hi everyone,
I'm relatively new to pyqt and am encountering some problems while
trying
to make a custom tree widget
On Monday 04 February 2008 08:52:44 Baba-k wrote:
Hi everyone,
I'm relatively new to pyqt and am encountering some problems while trying
to make a custom tree widget (using the model/view classes) that i was
hoping some one here might be able to help me with.
Ive made a custom treewidget
Hi everyone,
I'm relatively new to pyqt and am encountering some problems while trying to
make a custom tree widget (using the model/view classes) that i was hoping
some one here might be able to help me with.
Ive made a custom treewidget which is using a custom view and model. The
view is a
Hi
I am experiencing some confusion regarding the model/view architecture
when using a QTreeView with a custom
QAbstractItemModel.
This is the bigger picture of what I am doing:
* I use a tree view to browse and edit a bunch of object.
* I have a data class (TreeNode) used to store my data.
On 2007-11-09, Dirk Wagener wrote:
Hi
I am experiencing some confusion regarding the model/view architecture
when using a QTreeView with a custom
QAbstractItemModel.
[snip]
Can somebody please give me some advice. Where can I learn how to do
this model/view interaction properly?
Are there
On 09.11.07 10:02:31, Mark Summerfield wrote:
On 2007-11-09, Dirk Wagener wrote:
Hi
I am experiencing some confusion regarding the model/view architecture
when using a QTreeView with a custom
QAbstractItemModel.
[snip]
Can somebody please give me some advice. Where can I learn how to
On 09.11.07 10:58:08, Dirk Wagener wrote:
At this stage I am doing something wrong regarding this. Now and then
(sporadically) I get access violations when getting the
underlying data from a QModelIndex():
tmpTreeNode = currentModelIndex.internalPointer()
To test to a certain extent that
56 matches
Mail list logo