Git Product home page Git Product logo

qwt's Introduction

The Qwt Widget Library
----------------------

      Qwt is an extension to the libraries of the Qt Project.  

      The Qwt library contains widgets and components which are 
      primarily useful for technical and scientifical purposes.
      It includes a 2-D plotting widget, different kinds of sliders, 
      and much more.

      Qwt is hosted at http://qwt.sf.net

Installation
------------
      
      Read INSTALL how to build and install Qwt.

Copyright
---------

    Qwt Widget Library 
    Copyright (C) 1997   Josef Wilgen
    Copyright (C) 2002   Uwe Rathmann

    Qwt is published under the Qwt License, Version 1.0.
    You should have received a copy of this licence in the file
    COPYING.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

  

qwt's People

Contributors

agarny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qwt's Issues

Compile error in Windows with mingw: QPainterPath

Hi,

I have an error during compile this project. (qmake command has no error, mingw32-make compiler errors)

Error example:

compiling moc/moc_qwt_plot_glcanvas.cpp
moc\moc_qwt_plot_glcanvas.cpp: In static member function 'static void QwtPlotGLCanvas::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
moc\moc_qwt_plot_glcanvas.cpp:119:32: error: variable 'QPainterPath _r' has initializer but incomplete type
         case 1: { QPainterPath _r = _t->borderPath((*reinterpret_cast< const QRect(*)>(_a[1])));
                                ^~
moc\moc_qwt_plot_glcanvas.cpp:119:95: error: invalid use of incomplete type 'class QPainterPath'
         case 1: { QPainterPath _r = _t->borderPath((*reinterpret_cast< const QRect(*)>(_a[1])));
                                                                                               ^
In file included from C:\Qt\5.15.2\mingw81_64\include/QtGui/qbrush.h:49,
                 from C:\Qt\5.15.2\mingw81_64\include/QtGui/qpalette.h:46,
                 from C:\Qt\5.15.2\mingw81_64\include/QtWidgets/qwidget.h:48,
                 from C:\Qt\5.15.2\mingw81_64\include\QtWidgets/qframe.h:44,
                 from moc\../qwt_plot_glcanvas.h:14,
                 from moc\moc_qwt_plot_glcanvas.cpp:10:
C:\Qt\5.15.2\mingw81_64\include/QtGui/qmatrix.h:54:7: note: forward declaration of 'class QPainterPath'
 class QPainterPath;
       ^~~~~~~~~~~~
mingw32-make[2]: *** [Makefile.Release:13666: release/moc_qwt_plot_glcanvas.o] Error 1
mingw32-make[2]: Leaving directory 'F:/qwt-6.1.4/qwt-6.1.4/src'
mingw32-make[1]: *** [Makefile:49: release-all] Error 2
mingw32-make[1]: Leaving directory 'F:/qwt-6.1.4/qwt-6.1.4/src'
mingw32-make: *** [Makefile:53: sub-src-make_first-ordered] Error 2

The problem is the lack of include #include <QPainterPath>. I write this line to this files,

  • qwt_painter_command.h
  • qwt_painter.h
  • qwt_null_paintdevice.h
  • qwt_plot_glcanvas.h
    and that's working.
    I'm not perfect in C++. This is good solution?

My English isn't perfect, sorry

Crash in qwt_date_scale_engine.cpp

Hi,

the function

static QList< double > qwtDstTicks( const QDateTime& dateTime, int secondsMajor, int secondsMinor )

crashes when secondsMajor is 0

I guess the code at the start
if ( secondsMinor <= 0 ) QList< double >();

should be
if ( secondsMinor <= 0 ) return QList< double >();

Only the last x label got displayed after setting ScaleDraw

Hello, I have implemented ScaleDraw like this:

	class ScaleDraw: public QwtScaleDraw {
		public:
			ScaleDraw(const std::vector<std::string> &labels) :
					labels(labels) {
				setTickLength(QwtScaleDiv::MinorTick, 4);
				setTickLength(QwtScaleDiv::MediumTick,6);
				setTickLength(QwtScaleDiv::MajorTick, 8);

				enableComponent(QwtScaleDraw::Backbone, false);

				setLabelRotation(-90.0);

				setLabelAlignment(Qt::AlignLeft | Qt::AlignVCenter);
			}

			virtual QwtText label(double value) const QWT_OVERRIDE
			{
				QwtText lbl;

				const int index = qRound(value);
				if (index >= 0 && index < labels.size()) {
					lbl = QwtText(QString::fromStdString(labels[index]));
				}

				return lbl;
			}

		private:
			const std::vector<std::string> labels;
	};

and set Scale Draw like this:

void setXLabels(const std::vector<std::string> &labels) {
	int axis = QwtAxis::XBottom;
	setAxisMaxMinor(axis, 3);
	setAxisScaleDraw(axis, new ScaleDraw(labels));
	replot();
}

and my labels has 100 values like this:
1.000016 18.000511 35.001006 52.001501 69.001996 86.002491 103.002986 120.003481 137.003977 154.004472 171.004967 188.005462 205.005957 222.006452 239.006947 256.007442 273.007937 290.008432 307.008927 324.009423 341.009918 358.010413 375.010908 392.011403 409.011898 426.012393 443.012888 460.013383 477.013878 494.014373 511.014869 528.015364 545.015859 562.016354 579.016849 596.017344 613.017839 630.018334 647.018829 664.019324 681.019819 698.020315 715.020810 732.021305 749.021800 766.022295 783.022790 800.023285 817.023780 834.024275 851.024770 868.025265 885.025761 902.026256 919.026751 936.027246 953.027741 970.028236 987.028731 1004.029226 1021.029721 1038.030216 1055.030711 1072.031207 1089.031702 1106.032197 1123.032692 1140.033187 1157.033682 1174.034177 1191.034672 1208.035167 1225.035662 1242.036157 1259.036653 1276.037148 1293.037643 1310.038138 1327.038633 1344.039128 1361.039623 1378.040118 1395.040613 1412.041108 1429.041603 1446.042099 1463.042594 1480.043089 1497.043584 1514.044079 1531.044574 1548.045069 1565.045564 1582.046059 1599.046554 1616.047049 1633.047545 1650.048040 1667.048535 1684.049030 1701.049525

and all of them has been converted to string.

And before setting ScaleDraw,plot likes this:
Workspace 1_1355
After setting ScaleDraw,plot becomes likes this:
Workspace 1_1356

As you can,only the first label: 1.000016 got displayed as the last label in the plot.

Would you please tell me why this happen?

Incomplete rendering during drag operations in QwtPlot

Incomplete rendering during drag operations in QwtPlot

Environment

  • Qwt version: 1.0
  • Qt version: 5.9.9
  • Operating System: Windows 11

Steps to Reproduce

  1. Open the application with a QwtPlot widget.
  2. Begin a drag operation to resize or move the plot.
  3. Observe the rendering of the plot area.

Expected Behavior

The plot should render smoothly and completely during and after the drag operation.

Actual Behavior

During dragging, parts of the plot are not rendered, leaving blank areas that only fill in once the drag operation is completed.

Screenshots

屏幕截图 2024-08-22 170518
屏幕截图 2024-08-22 170518

Additional Information

No similar issues found. Temporary workaround has been to force a replot after the drag operation, but this results in flickering.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.