Results 1 to 4 of 4

Thread: qwtplot3d:my scale is unreadable

  1. #1
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default qwtplot3d:my scale is unreadable

    Hi, I plot a 3D graph with QwtPlot3D and everything is ok but my scale, it is unreadable.I'm running ubuntu10.04.It troubles me some days.Here are my codes and screenshot.Thanks for your attention!
    Screenshot.png
    Qt Code:
    1. createCoordinateSystem(Qwt3D::Triple(0, 0, 0), Qwt3D::Triple(100, 100, 100));
    2.  
    3. for (unsigned i=0; i!=coordinates()->axes.size(); ++i)//set the axes scal
    4. {
    5. coordinates()->axes[i].setMajors(7);
    6. coordinates()->axes[i].setMinors(3);
    7. coordinates()->axes[i].setLabelColor(RGBA(0,0,0));
    8. }
    9.  
    10. coordinates()->setNumberColor(RGBA(0,0,0));
    11. coordinates()->setNumberFont("Times",10, QFont::Bold);
    12. coordinates()->setLineSmooth(true);
    13. coordinates()->setGridLines(true, true);
    14. coordinates()->setLabelFont(QFont("Times", 12, QFont::Bold));
    15.  
    16. setPlotStyle(Bar(0.004, 0.05));
    17. setCoordinateStyle(FRAME);
    18. //disableMouse(true);
    19. updateData();
    20. updateGL();
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. coordinates()->axes[X1].setLabelString(QString("Phase"));
    2. coordinates()->axes[Y1].setLabelString(QString("Cycle"));
    3. coordinates()->axes[Z1].setLabelString(QString("Amplitude"));
    To copy to clipboard, switch view to plain text mode 
    In addition, I want to run the demo in QwtPlot3D. Following the instruction: qmake; make; I got errors as follow:
    Qt Code:
    1. tmp/ui_mesh2mainwindowbase4.h: In member function ‘void Ui_MainWindow::setupUi(QMainWindow*)’:
    2. tmp/ui_mesh2mainwindowbase4.h:69: error: ‘class QGridLayout’ has no member named ‘setLeftMargin’
    3. tmp/ui_mesh2mainwindowbase4.h:70: error: ‘class QGridLayout’ has no member named ‘setTopMargin’
    4. tmp/ui_mesh2mainwindowbase4.h:71: error: ‘class QGridLayout’ has no member named ‘setRightMargin’
    5. tmp/ui_mesh2mainwindowbase4.h:72: error: ‘class QGridLayout’ has no member named ‘setBottomMargin’
    6. tmp/ui_mesh2mainwindowbase4.h:73: error: ‘class QGridLayout’ has no member named ‘setHorizontalSpacing’
    7. tmp/ui_mesh2mainwindowbase4.h:74: error: ‘class QGridLayout’ has no member named ‘setVerticalSpacing’
    To copy to clipboard, switch view to plain text mode 
    Can anyone help?

  2. #2
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qwtplot3d:my scale is unreadable

    Maybe I forgot something, I am running Ubuntu10.04 and QT4.2.3. I have no idea about this mistake.

    Maybe I forgot something, I am running Ubuntu10.04 and QT4.2.3. I have no idea about this mistake.


    Added after 1 7 minutes:


    Maybe I can show you the code:
    Qt Code:
    1. PRPS_3d::PRPS_3d(QWidget *parent)
    2. :SurfacePlot(parent)
    3. {
    4. createCoordinateSystem(Qwt3D::Triple(0, 0, 0), Qwt3D::Triple(100, 100, 100));
    5.  
    6. for (unsigned i=0; i!=coordinates()->axes.size(); ++i)//set the axes scal
    7. {
    8. coordinates()->axes[i].setMajors(7);
    9. coordinates()->axes[i].setMinors(3);
    10. coordinates()->axes[i].setLabelColor(RGBA(0,0,0));
    11. }
    12.  
    13. coordinates()->setNumberColor(RGBA(0,0,0));
    14. coordinates()->setNumberFont("Times",10, QFont::Bold);
    15. coordinates()->setLineSmooth(true);
    16. coordinates()->setGridLines(true, true);
    17. coordinates()->setLabelFont(QFont("Times", 12, QFont::Bold));
    18.  
    19. setPlotStyle(Bar(0.004, 0.05));
    20. setCoordinateStyle(FRAME);
    21. //disableMouse(true);
    22. updateData();
    23. updateGL();
    24. }
    25.  
    26. void PRPS_3d::updateMaxPlot(int columns, int rows, double **Qdata)
    27. {
    28. setScale(1, 1, 1);
    29.  
    30. loadFromData(Qdata, rows, columns, 0, rows, 0, columns);
    31.  
    32. coordinates()->axes[X1].setLabelString(QString("Phase"));
    33. coordinates()->axes[Y1].setLabelString(QString("Cycle"));
    34. coordinates()->axes[Z1].setLabelString(QString("Amplitude"));
    35.  
    36. updateData();
    37. updateGL();
    38.  
    39. }
    To copy to clipboard, switch view to plain text mode 
    Could anybody tell me where I make a mistake and how to fix the problem?
    Maybe my discription is hard to understand and forgive my broken english.
    Last edited by sexgirl; 25th December 2013 at 02:08.

  3. #3
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qwtplot3d:my scale is unreadable

    OK, QwtPlot3D demo error is due to mismatch of QT Version. I delete mesh from example.pro, then done.

  4. #4
    Join Date
    Oct 2011
    Posts
    6
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qwtplot3d:my scale is unreadable

    It troubles me so many days, can anyone help me?

Similar Threads

  1. Qt Creator Unreadable colours for Documentation
    By Ram-Z in forum Qt Tools
    Replies: 10
    Last Post: 11th March 2014, 14:29
  2. Qwtplot3d with Qt 5?
    By thegreger in forum Newbie
    Replies: 0
    Last Post: 21st October 2013, 15:49
  3. Make Config files unreadable
    By mrandreas in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2011, 00:53
  4. Unreadable font in QT4.7.1 (Windows)
    By i3th in forum Qt Programming
    Replies: 2
    Last Post: 11th March 2011, 15:00
  5. program crashes on unreadable characters. SOLVED
    By JeanC in forum Qt Programming
    Replies: 7
    Last Post: 1st March 2008, 19:53

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.