Results 1 to 4 of 4

Thread: Qwt library building problem

  1. #1
    Join Date
    Dec 2013
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Qwt library building problem

    Hello there.
    I'm trying to build QWT library, and while compiling I get some ridiculous compilation errors, like . For exapmle,

    qwt_legend.cpp:226: error: 'class QWidget' has no member named 'layout'
    qwt_legend.cpp: In member function 'void QwtLegend::setMaxColumns(uint)'

    Looking into source I saw some strange expression on 226 line of this file:

    Qt Code:
    1. void layoutContents()
    2. {
    3. const QwtDynGridLayout *tl = qobject_cast<QwtDynGridLayout *>(
    4. contentsWidget->layout() );
    To copy to clipboard, switch view to plain text mode 

    Here contentsWidget has type of QWidget*. So, it really has no member function layout(). So, I don't know what to think. Even more, in whole project I have found no object having such a function. Isn't it a bit weird? I'm totally sure I don't understand something simple, but I really can't understand what is it exactly.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qwt library building problem

    Here contentsWidget has type of QWidget*. So, it really has no member function layout().
    Of course it does: QWidget::layout()
    Exactly which version of Qwt, which version of Qt, which platform? Post the first couple of error messages and the compiler call that produced them.

  3. #3
    Join Date
    Dec 2013
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qwt library building problem

    Quote Originally Posted by ChrisW67 View Post
    Of course it does: QWidget::layout()
    Exactly which version of Qwt, which version of Qt, which platform? Post the first couple of error messages and the compiler call that produced them.
    Qt 4.8.1
    As for Qwt, I tried 6.1.0 and 6.0.2.
    Platform - windows 7, 64bit.

    Compiler call:

    C:\qwt-6.1.0>make
    cd src\ && c:\QtSDK\Desktop\Qt\4.8.1\mingw\bin\qmake.exe c:\qwt-6.1.0\src\src.pr
    o -o Makefile
    cd src\ && make -f Makefile
    make[1]: Entering directory `C:/qwt-6.1.0/src'
    make -f Makefile.Debug all
    make[2]: Entering directory `C:/qwt-6.1.0/src'
    compiling qwt_abstract_scale_draw.cpp
    compiling qwt_clipper.cpp
    ....
    compiling qwt_legend.cpp
    qwt_legend.cpp: In member function 'void QwtLegend::PrivateData::LegendView::layoutContents ()':
    qwt_legend.cpp:226: error: 'class QWidget' has no member named 'layout'
    qwt_legend.cpp: In member function 'void QwtLegend::setMaxColumns(uint)':
    qwt_legend.cpp:295: error: 'class QWidget' has no member named 'layout'qwt_legend.cpp:
    In member function 'uint QwtLegend::maxColumns() const':
    qwt_legend.cpp:309: error: 'class QWidget' has no member named 'layout'
    qwt_legend.cpp: In member function 'virtual void QwtLegend::updateLegend(const Q
    Variant&, const QList<QwtLegendData>&)':
    ...

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qwt library building problem

    Qwt 6.0.2 and 6.1.0 build cleanly for me using 4.8.0 and 4.8.4 and MingW on Windows. I don't have a Qt 4.8.1 to hand.

    Try a clean build, using the Qt 4.8.1 qmake after commenting out the following line in qwtbuild.pri:
    Qt Code:
    1. CONFIG += silent
    To copy to clipboard, switch view to plain text mode 

    BTW: Why use an old version of Qt?

Similar Threads

  1. building and using a library
    By bossy in forum Newbie
    Replies: 4
    Last Post: 8th January 2012, 18:06
  2. Library and Subdirs building problem
    By herenbdy in forum Qt Programming
    Replies: 2
    Last Post: 10th July 2008, 02:10
  3. Building a library with qmake
    By wallyqt in forum Qt Programming
    Replies: 3
    Last Post: 22nd November 2007, 14:17
  4. Building qt program with static library
    By JonathanForQT4 in forum Newbie
    Replies: 2
    Last Post: 22nd June 2007, 23:15
  5. Building a third party library
    By munna in forum General Programming
    Replies: 1
    Last Post: 6th October 2006, 20:43

Tags for this Thread

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.