[PyQt] RE: Drag and Drop TextEdit
    adonay at k-demar.org 
    adonay at k-demar.org
       
    Fri Sep 19 17:37:56 BST 2008
    
    
  
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 at k-demar.org adonay at k-demar.org
Date: Mon, 8 Sep 2008 17:20:36 -0400
To: pyqt at 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
    
    
More information about the PyQt
mailing list