Results 1 to 10 of 10

Thread: QTextEdit drag and drop problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Feb 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextEdit drag and drop problem

    I have one more question concerning this topic..I changed approach a little bit and i tried subclassing QTextEdit this way(The body of this functions is taken directly from drag-and-drop documentation of QTextEdit):

    Qt Code:
    1. #ifndef TEXTEDITOR_H
    2. #define TEXTEDITOR_H
    3. #include <QtGui>
    4. class TextEditor: public QTextEdit
    5. {
    6. Q_OBJECT
    7.  
    8. protected:
    9. bool canInsertFromMimeData( const QMimeData *source ) const;
    10. void insertFromMimeData( const QMimeData *source );
    11. };
    12.  
    13. #endif // TEXTEDITOR_H
    To copy to clipboard, switch view to plain text mode 

    Then I put my new widget- TextEditor, using QT Creator, to my project but unfotunatelly there's error when compiling it:

    debug/mainwindow.o:mainwindow.cpp.text$_ZN13Ui_MainWindow7setupUiEP11QMainWindow[Ui_MainWindow::setupUi(QMainWindow*)]+0xcc0): undefined reference to `TextEditor::TextEditor(QWidget*)'

    collect2: ld returned 1 exit status

    Does anybody know why such error occurs and how to fix it?
    Regards!
    Last edited by high_flyer; 24th February 2011 at 08:52. Reason: code tags

Similar Threads

  1. QTextEdit Drag and Drop
    By guiQt in forum Qt Programming
    Replies: 5
    Last Post: 29th August 2010, 16:36
  2. Drag Drop Images from WebPage into QTextEdit
    By Nemo in forum Qt Programming
    Replies: 7
    Last Post: 15th December 2009, 09:35
  3. QTextEdit drag and drop
    By bunjee in forum Qt Programming
    Replies: 6
    Last Post: 7th February 2008, 16:41
  4. Drag and drop image into a QTextEdit ?
    By balazsbela in forum Qt Programming
    Replies: 1
    Last Post: 3rd September 2007, 14:47
  5. Drag n Drop problem
    By ScoOteR in forum Qt Programming
    Replies: 1
    Last Post: 21st March 2007, 10:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.