Results 1 to 20 of 36

Thread: HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    4
    Thanked 4 Times in 2 Posts

    Exclamation HowTo: Installation of Qt 5.0.1 and Qwt 6.1.0 rc3 (Win7 64bit)

    Hello everyone,

    i was trying to get Qwt running properly on my Windows7 64bit PC. After hours of trying to find the right way to do this i wrote a step by step install and test manual.
    I would appreciate a comment of Uwe if this is the right way to do it, especially on the systems path and user variables.
    @Uwe: I also hope this guide saves you some time explaining people how to install qwt.

    Lets start:
    1. Download and install QT 5.0.1 (MinGw) to: "C:\Qt\Qt5.0.1"
    2. Download and extract Qwt 6.1 RC3 to: "C:\qwt-6.1-rc3"
    3. Add "C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin" to your systems path variable (qmake.exe is located here)
    4. Add "C:\Qt\Qt5.0.1\Tools\MinGW\bin" to your systems path variable (mingw32-make.exe is located here)
    5. Open a command line (cmd) and navigate to: "C:\qwt-6.1-rc3"
    6. Type: "qmake" (This command won't prompt any msg so don't worry)
    7. Type: "mingw32-make" (Compiles the whole project with examples; this will take a while so be patient)
    8. Type: "mingw32-make install" (This installs qwt to the directory set in "C:\qwt-6.1-rc3\qwtconfig.pri"; the default location is "C:/Qwt-$$QWT_VERSION-rc3" -> "C:\Qwt-6.1.0-rc3\")
    9. Add "C:\Qwt-6.1.0-rc3\lib" to your systems path variable
    10. Add a User variable named "QT_PLUGIN_PATH" with the following path "C:\Qwt-6.1.0-rc3\plugins"
    11. Add a User variable named "QMAKEFEATURES" with the following path "C:\Qwt-6.1.0-rc3\features"
    12. Start Qt Creator
    13. Create a new project: File -> New File or Project ... -> Applications -> Qt Gui Application -> Choose
    14. Name it "Test"
    15. Create the project in the following directory: "C:\workspace"
    16. Open file "Test.pro"
    17. Add "Config += qwt" at the bottom
    18. Open the main.c of the project and delete all its content.
    19. Paste the following in the main.c (This is the qwt example "simpleplot"):
    Qt Code:
    1. #include <qapplication.h>
    2. #include <qwt_plot.h>
    3. #include <qwt_plot_curve.h>
    4. #include <qwt_plot_grid.h>
    5. #include <qwt_symbol.h>
    6. #include <qwt_legend.h>
    7.  
    8. int main( int argc, char **argv )
    9. {
    10. QApplication a( argc, argv );
    11.  
    12. QwtPlot plot;
    13. plot.setTitle( "Plot Demo" );
    14. plot.setCanvasBackground( Qt::white );
    15. plot.setAxisScale( QwtPlot::yLeft, 0.0, 10.0 );
    16. plot.insertLegend( new QwtLegend() );
    17.  
    18. QwtPlotGrid *grid = new QwtPlotGrid();
    19. grid->attach( &plot );
    20.  
    21. QwtPlotCurve *curve = new QwtPlotCurve();
    22. curve->setTitle( "Some Points" );
    23. curve->setPen( Qt::blue, 4 ),
    24. curve->setRenderHint( QwtPlotItem::RenderAntialiased, true );
    25.  
    26. QwtSymbol *symbol = new QwtSymbol( QwtSymbol::Ellipse,
    27. QBrush( Qt::yellow ), QPen( Qt::red, 2 ), QSize( 8, 8 ) );
    28. curve->setSymbol( symbol );
    29.  
    30. QPolygonF points;
    31. points << QPointF( 0.0, 4.4 ) << QPointF( 1.0, 3.0 )
    32. << QPointF( 2.0, 4.5 ) << QPointF( 3.0, 6.8 )
    33. << QPointF( 4.0, 7.9 ) << QPointF( 5.0, 7.1 );
    34. curve->setSamples( points );
    35.  
    36. curve->attach( &plot );
    37.  
    38. plot.resize( 600, 400 );
    39. plot.show();
    40.  
    41. return a.exec();
    42. }
    To copy to clipboard, switch view to plain text mode 
    20. Rightclick the project and select "run qmake..."
    21. Now run the project. It should compile without errors and run.

    Remember this:
    For your own projects you now only have to add "Config += qwt" to your *.pro file to get Qwt running.

    I hope this tutorial helps to do your first steps with QT + Qwt.



    ---

    If this tutorial works and some admin is fine with it, i would suggest to mark it as a sticky thread.

  2. The following 3 users say thank you to M4chin3 for this useful post:

    maharnab91 (28th March 2013), rawfool (21st March 2013), tarjeik (10th April 2013)

Similar Threads

  1. Replies: 1
    Last Post: 14th November 2012, 19:20
  2. Replies: 0
    Last Post: 26th February 2012, 16:10
  3. Building 64bit Shared Qt Dlls on 64bit Win7 for Visual Studio
    By HarrySatt in forum Installation and Deployment
    Replies: 1
    Last Post: 29th November 2011, 05:39
  4. Replies: 0
    Last Post: 3rd October 2011, 14:36
  5. Win7 64bit remote debugging
    By mekl in forum Qt Programming
    Replies: 0
    Last Post: 20th June 2010, 21:20

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.