Mathias.Born | 1 Jun 10:28 2011
Picon
Picon

SIP bug: const T& versus T const&

Hi,

During my first steps with SIP I discovered that it accepts
function parameters like

void example_function(const T&);

but not

void example_function(T const&);

It would be nice if SIP supported this, too.

Best Regards,
Mathias Born

emmanuel_mayssat | 1 Jun 19:46 2011

QTreeView with blue line cursor at init


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 the qtreeview is not
dispalyed.
Is there a way to show it by default?
(The only way I am found after startup of the application is to select a node in the tree.
but this is one click too many !)

Regards,

--

-- 
Emmanuel
detlev | 2 Jun 10:37 2011
Picon

ANN: eric 5.1.3 released

Hi,

I just uploaded eric 5.1.3. It is a maintenance release fixing some bugs. It 
is available via the eric web site.

http://eric-ide.python-projects.org/index.html

Regards,
Detlev
--

-- 
Detlev Offenbach
detlev <at> die-offenbachs.de
detlev | 2 Jun 10:37 2011
Picon

ANN: eric 4.4.15 released

Hi,

I just uploaded eric 4.4.15. It is a maintenance release fixing some bugs. It 
is available via the eric web site.

http://eric-ide.python-projects.org/index.html

Regards,
Detlev
--

-- 
Detlev Offenbach
detlev <at> die-offenbachs.de
Nathan Weston | 2 Jun 15:05 2011

Drag-and-drop editing in QListWidget or QListView

I have a QListWidget with dragDropMode set to InternalMove, and I can 
move rows around by dragging as expected. But I also want to know when 
items are moved so I can update other data in my application, and I 
can't find any way to do this.

Would it help if I switched to QListView and implemented a model? I 
looked into this a bit but couldn't figure out how to do what I want.

Thanks,
- Nathan
David Boddie | 2 Jun 22:22 2011
Picon

QTreeView with blue line cursor at init

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 run button
> would execute, because the line cursor in the qtreeview is not dispalyed.
> Is there a way to show it by default?
> (The only way I am found after startup of the application is to select a
> node in the tree. but this is one click too many !)

You need to set the current item in the treeview. If you are using
QTreeWidget, you can use its setCurrentItem() method.

If you are using QTreeView, you need to access its selection model via its
selectionModel() method and call the model's setCurrentIndex() method with
a model index.

I think that should do what you want. If it doesn't, please let us know.

David
Brickle Macho | 3 Jun 00:07 2011
Picon

Where to start

Hi all,

New to the PyQt, have basic application working.  I have been working
through Rapid GUI Programming with Python and Qt and have basic programs
running. 

I am trying to do is display an image, and then using drag-selection to
select a sub-image for later processing.   Eventually I want to be able
to select multiple regions and tag each region for appropruate back end
processing, but for now just being able to select one sub-image would be
good.      I can display an image, but don't know how to implement
drag-selection (think it is also know as rubber band selection).  I am
assuming I will need to write some mouse-callbacks or something.  My
search-fu has failed me and I haven't been able to find any examples to
study.    Can someone give me any pointers to which widgets I should be
using and perhaps where to find a sample program I can study.

If you need more information please ask.

Thanks,

Brickle.
--

David Boddie | 3 Jun 01:42 2011
Picon

Re: Drag-and-drop editing in QListWidget or QListView

On Thu Jun 2 14:05:41 BST 2011, Nathan Weston wrote:

> I have a QListWidget with dragDropMode set to InternalMove, and I can
> move rows around by dragging as expected. But I also want to know when
> items are moved so I can update other data in my application, and I
> can't find any way to do this.

I don't think there's any way to get notified of moves when InternalMove
is used.

> Would it help if I switched to QListView and implemented a model? I
> looked into this a bit but couldn't figure out how to do what I want.

You can stay with a QListWidget if you want, but the mechanisms used to
handle dragging and dropping will be a bit different to those you would
use with QListView (where you would delegate most of this to the model).

The draganddrop/puzzle example provided with PyQt uses a QListWidget to
display a collection of puzzle pieces that can be dropped inside or outside
the list, though it's not exactly the most user friendly interface you
could imagine.

The itemviews/puzzle example is more or less the same, but uses QListView
instead of QListWidget. It implements support for drag and drop in a
custom model, which is based on QAbstractListModel to make it as simple as
possible. Strangely, the piece movement is quite a bit more intuitive than
in the other example.

David
(Continue reading)

David Boddie | 3 Jun 02:06 2011
Picon

Re: Where to start

On Thu Jun 2 23:07:12 BST 2011, Brickle Macho wrote:

> I am trying to do is display an image, and then using drag-selection to
> select a sub-image for later processing.   Eventually I want to be able
> to select multiple regions and tag each region for appropruate back end
> processing, but for now just being able to select one sub-image would be
> good.      I can display an image, but don't know how to implement
> drag-selection (think it is also know as rubber band selection).  I am
> assuming I will need to write some mouse-callbacks or something.  My
> search-fu has failed me and I haven't been able to find any examples to
> study.    Can someone give me any pointers to which widgets I should be
> using and perhaps where to find a sample program I can study.

There didn't seem to be much in the PyQt examples to show this - the
itemviews/chart example does use QRubberBand to allow the user to select
data, but that's not the best example to learn this technique from.

I quickly wrote an example that does part of what you want:

http://www.diotavelli.net/PyQtWiki/Selecting_a_region_of_a_widget

Hope this helps,

David
Brickle Macho | 3 Jun 03:33 2011
Picon

Re: Where to start

Hi David,

Thanks that helps a lot, really appreciate it.

Brickle.
--

On 3/06/11 8:06 AM, David Boddie wrote:
> On Thu Jun 2 23:07:12 BST 2011, Brickle Macho wrote:
>
>> I am trying to do is display an image, and then using drag-selection to
>> select a sub-image for later processing.   Eventually I want to be able
>> to select multiple regions and tag each region for appropruate back end
>> processing, but for now just being able to select one sub-image would be
>> good.      I can display an image, but don't know how to implement
>> drag-selection (think it is also know as rubber band selection).  I am
>> assuming I will need to write some mouse-callbacks or something.  My
>> search-fu has failed me and I haven't been able to find any examples to
>> study.    Can someone give me any pointers to which widgets I should be
>> using and perhaps where to find a sample program I can study.
> There didn't seem to be much in the PyQt examples to show this - the
> itemviews/chart example does use QRubberBand to allow the user to select
> data, but that's not the best example to learn this technique from.
>
> I quickly wrote an example that does part of what you want:
>
> http://www.diotavelli.net/PyQtWiki/Selecting_a_region_of_a_widget
>
> Hope this helps,
>
(Continue reading)


Gmane