Results 1 to 12 of 12

Thread: Subclassing QGraphicsView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Apr 2007
    Posts
    117
    Thanks
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Subclassing QGraphicsView

    Using your previous tips I got compilation errors that says
    iadfuqgraphicsview.h:14: error: expected `,' or `...' before '*=' token
    iadfuqgraphicsview.cpp:4: error: prototype for `IADFUQGraphicsView::IADFUQGraphicsView(QGraphicsS cene*, QWidget*)' does not match any in class `IADFUQGraphicsView'
    iadfuqgraphicsview.h:10: error: candidates are: IADFUQGraphicsView::IADFUQGraphicsView(const IADFUQGraphicsView&)
    iadfuqgraphicsview.h:14: error: IADFUQGraphicsView::IADFUQGraphicsView(QGraphicsSc ene*, QWidget)

    iadfuqgraphicsview.cpp
    Qt Code:
    1. #include <QtGui>
    2. #include "iadfuqgraphicsview.h"
    3. IADFUQGraphicsView::IADFUQGraphicsView(QGraphicsScene *scene, QWidget* parent) :QGraphicsView(scene, parent)
    4. {
    5. }
    To copy to clipboard, switch view to plain text mode 

    complete header code
    Qt Code:
    1. #ifndef IADFUQGRAPHICSVIEW_H
    2. #define IADFUQGRAPHICSVIEW_H
    3.  
    4. class QObject;
    5. class QWidget;
    6.  
    7. class IADFUQGraphicsView : public QGraphicsView
    8. {
    9. Q_OBJECT
    10.  
    11. public:
    12. IADFUQGraphicsView(QGraphicsScene*, QWidget*= NULL);
    13. ~IADFUQGraphicsView();
    14. };
    15.  
    16. #endif
    To copy to clipboard, switch view to plain text mode 
    Last edited by sincnarf; 27th August 2007 at 18:53. Reason: insufficient error report
    Image Analysis Development Framework Using Qt (IADFUQ)

Similar Threads

  1. QGraphicsView
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th July 2007, 08:00
  2. Speed, transparency, and drop issues with QGraphicsView
    By jefferai in forum Qt Programming
    Replies: 16
    Last Post: 30th June 2007, 16:14
  3. no image displayed on QGraphicsView
    By sincnarf in forum Qt Programming
    Replies: 9
    Last Post: 28th June 2007, 12:33
  4. QGraphicsView and item focus
    By Micawber in forum Qt Programming
    Replies: 3
    Last Post: 22nd June 2007, 20:36
  5. Using QGraphicsView with model/view programming
    By JLP in forum Qt Programming
    Replies: 3
    Last Post: 29th January 2007, 11:04

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.