Results 1 to 1 of 1

Thread: Q3ScrollView resists to scroll down to the garbage bin

  1. #1
    Join Date
    Jul 2008
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default Q3ScrollView resists to scroll down to the garbage bin

    Hi there,

    1) we use Qt 4.2.2 together with MSVC 2003.

    2) We have a painful old 3party library, which we HAVE TO use. This library uses unfortunately Q3ScrollView. This means i can not simply replace it with QScrollArea etc.

    3) In that library there is a class PainfulPlot2D, which has a right click menu. Some of the actions of the menu are causing crash, and we try to remove these actions from the menu by generating a subclass like:

    class MyDerivedPlot2D: public PainfulPlot2D
    {
    public:

    typedef PainfulPlot2D BaseClass;

    QMenu * createContextMenu(){

    QMenu* myMenu = BaseClass::createContextMenu();

    QList<QAction*> actionList = myMenu->actions();
    QAction* eraseAction = NULL;
    QAction* legendsAction = NULL;

    for(int actionIndex = 0; actionIndex < actionList.size(); actionIndex++){

    QString actionsIconText = actionList.at(actionIndex)->iconText();
    if( actionsIconText == QString("&Show legends"))

    legendsAction = actionList.at(actionIndex);
    if( actionsIconText == QString("&Clear"))

    eraseAction = actionList.at(actionIndex);
    }

    if(legendsAction != NULL)

    myMenu->removeAction(legendsAction);
    if(eraseAction != NULL)

    myMenu->removeAction(eraseAction);

    return myMenu;
    }

    void contextMenuEvent(QContextMenuEvent * event)
    {

    QMenu * contextMenu = createContextMenu();
    if(contextMenu)
    {

    contextMenu->exec(event->globalPos());
    }

    delete contextMenu;
    event->accept();
    }
    };

    4) Luckily enough we do not use a .pro file, where i could add the line

    QT += qt3support

    We call the moc and uic as custom build tools separately. In order to compensate this, i tried to add MACROs like QT_QT3SUPPORT_LIB, QT3SUPPORT, QT3_SUPPORT to the preprocessor definitions. -> Did not help


    5) I have tried to add the include path for QT3support library at the project properties it did not help. The problem is not the include, the file seems to be found. There is no compile error.

    6) There are 44 link errors, from which i had the feeling that it is not the inclusion but the link to the mouse events or similar. Probably the event capture for right click is not being linked.

    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::styleChange(class QStyle &)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::setVScrollBarMode(enum Q3ScrollView::ScrollBarMode)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::setVisible(bool)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::setResizePolicy(enum Q3ScrollView::ResizePolicy)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::setMargins(int,int,int,int)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::setHScrollBarMode(enum Q3ScrollView::ScrollBarMode)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::setDragAutoScroll(bool)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::setCornerWidget(class QWidget *)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::setContentsPos(int,int)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::resizeContents(int,int)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::moveChild(class QWidget *,int,int)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual void __thiscall Q3ScrollView::addChild(class QWidget *,int,int)"
    QtMyDll error LNK2001: unresolved external symbol "public: virtual class QSize __thiscall Q3ScrollView::sizeHint(void)const "
    QtMyDll error LNK2001: unresolved external symbol "public: virtual class QSize __thiscall Q3ScrollView::minimumSizeHint(void)const "
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportWheelEvent(class QWheelEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportMouseReleaseEvent(class QMouseEvent *)" (?viewportMouseReleaseEvent@Q3ScrollView@@MAEXPAVQ MouseEvent@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportMousePressEvent(class QMouseEvent *)" (?viewportMousePressEvent@Q3ScrollView@@MAEXPAVQMo useEvent@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportMouseDoubleClickEvent(class QMouseEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportDropEvent(class QDropEvent *)" (?viewportDropEvent@Q3ScrollView@@MAEXPAVQDropEven t@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportDragMoveEvent(class QDragMoveEvent *)" (?viewportDragMoveEvent@Q3ScrollView@@MAEXPAVQDrag MoveEvent@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportDragLeaveEvent(class QDragLeaveEvent *)" (?viewportDragLeaveEvent@Q3ScrollView@@MAEXPAVQDra gLeaveEvent@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportDragEnterEvent(class QDragEnterEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::viewportContextMenuEvent(class QContextMenuEvent *)" (?viewportContextMenuEvent@Q3ScrollView@@MAEXPAVQC ontextMenuEvent@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::mouseReleaseEvent(class QMouseEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::mousePressEvent(class QMouseEvent *)" (?mousePressEvent@Q3ScrollView@@MAEXPAVQMouseEvent @@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::mouseMoveEvent(class QMouseEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent@Q3ScrollView@@MAEXPAVQMous eEvent@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::frameChanged(void)" (?frameChanged@Q3ScrollView@@MAEXXZ)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::fontChange(class QFont const &)" (?fontChange@Q3ScrollView@@MAEXABVQFont@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::drawContentsOffset(class QPainter *,int,int,int,int,int,int)" (?drawContentsOffset@Q3ScrollView@@MAEXPAVQPainter @@HHHHHH@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::drawContents(class QPainter *,int,int,int,int)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsWheelEvent(class QWheelEvent *)" (?contentsWheelEvent@Q3ScrollView@@MAEXPAVQWheelEv ent@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsMouseReleaseEvent(class QMouseEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsMouseMoveEvent(class QMouseEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsMouseDoubleClickEvent(class QMouseEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsDropEvent(class QDropEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsDragMoveEvent(class QDragMoveEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsDragLeaveEvent(class QDragLeaveEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsDragEnterEvent(class QDragEnterEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3ScrollView::contentsContextMenuEvent(class QContextMenuEvent *)" (?contentsContextMenuEvent@Q3ScrollView@@MAEXPAVQC ontextMenuEvent@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual void __thiscall Q3Frame::drawFrame(class QPainter *)" (?drawFrame@Q3Frame@@MAEXPAVQPainter@@@Z)
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual bool __thiscall Q3ScrollView::focusNextPrevChild(bool)"
    QtMyDll error LNK2001: unresolved external symbol "protected: virtual bool __thiscall Q3ScrollView::eventFilter(class QObject *,class QEvent *)"
    QtMyDll error LNK2001: unresolved external symbol "private: virtual void __thiscall Q3ScrollView::drawContents(class QPainter *)"



    7) From the contents of the link errors, i have the feeling that it is not a access problem. Alongside private and protected methods, the public methods caused the same link error.

    8) If we use the PainfulPlot2D class as is from the painful library as is it is being linked without a problem.



    Please help!
    Last edited by sivrisinek; 5th February 2009 at 19:07.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.