[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] RE: Drag and Drop TextEdit
From: "adonay () k-demar ! org" <adonay () k-demar ! org>
Date: 2008-09-19 16:37:56
Message-ID: 380-220089519163756461 () M2W024 ! mail2web ! com
[Download RAW message or body]
Hello:
If anyone interest the answer, finally I found it by casuality.
If you create the gui with qt4 designer, it puts a scrollareaWidgetContents
that grabs the mouse focus. For this reason, drag'n'drop doesn't work.
You need to edit .ui file, and set width & height of
scrollareaWidgetContents to 0
or remove scrollareaWidgetContents lines (this is my favorite method)
In .ui file you have these lines to remove:
<widget class="QWidget" name="scrollAreaWidgetContents" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>515</width>
<height>412</height>
</rect>
</property>
</widget>
And now it works, as child of scrollArea.
I think that this an error from designer, because this widget only must be
created if, using the designer, makes a child of it. No create
scrollareaWidgetContents by default, if no child on it.
Anyway.
Tnx,
Adonay
Original Message:
-----------------
From: adonay@k-demar.org adonay@k-demar.org
Date: Mon, 8 Sep 2008 17:20:36 -0400
To: pyqt@riverbankcomputing.com
Subject: Drag and Drop TextEdit
Hi
I'm doing a program that I need a TextEdit with drag&drop to move the
position.
I have a Scrollarea, a textEdit, and a textedit2
scrollarea is the parent of textedit
and textedit2 is the widget that I need to move.
If I make textedit as his parent, no work drag&drop
and if I make scrollarea as his parent, no work scrollbar of scrollarea,
but works d&d
I uploaded to my server a little app, to show it
http://k-demar.org/actualitzacions/scrollarea.zip
Can anyone help me plz?
Tnx,
Adonay
--------------------------------------------------------------------
mail2web.com – Enhanced email for the mobile individual based on Microsoft®
Exchange - http://link.mail2web.com/Personal/EnhancedEmail
--------------------------------------------------------------------
mail2web.com – What can On Demand Business Solutions do for you?
http://link.mail2web.com/Business/SharePoint
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic