我现在使用Qwt已经两年了.我喜欢它的面向对象的类,这使得很容易适应这些图和功能.如今,QCustomPlot正变得越来越受欢迎,并与Qwt竞争.当然我确实比较了API.但是,我对两个图书馆的有经验的用户的证词感兴趣.什么方便?什么不是?有任何陷阱吗?
我有巨大的 - 大约300万对 - 2D点阵列,我需要在基于Qt的应用程序中以合理的速度渲染.
我已经尝试过使用QGraphicsScene,但它甚至在400000原语上都非常慢,所以我正在调查qwt库.
它有散点图例如屏幕截图的SF网页,它看起来像正是我需要的,但我不能找到既不任何形式的实际代码,可用于这一数据,也没有在QWT文档根据API -仅提及不同类型的曲线.
因此,获得散点图示例的一些指示以及对其性能的一些建议会很好.其他c ++ qt兼容绘图库的建议也可以应对这一数据量.
在我的Qt应用程序中,我正在进行一些网络测试.我必须根据测试输出创建一个报告.所以我需要以pdf格式创建报告.
有人可以告诉我如何将我的测试结果放在pdf文件中吗?我的结果包含使用Qwt库的图表.
QThread当我按下按钮Run时,我想启动我.但编译器输出以下错误:
QThread: Destroyed while thread is still running
ASSERT failure in QThread::setTerminationEnabled(): "Current thread was not started with QThread.", file thread\qthread_win.cp.
Run Code Online (Sandbox Code Playgroud)
我不知道我的代码有什么问题.
任何帮助,将不胜感激.
这是我的代码:
SamplingThread::SamplingThread( QObject *parent):
QwtSamplingThread( parent ),
d_frequency( 5.0 )
{
init();
}
MainWindow::MainWindow( QWidget *parent ):
QMainWindow( parent )
{.......
.....
run= new QPushButton ("Run",this);
stop= new QPushButton("Stop",this);
connect(run, SIGNAL(clicked()),this, SLOT (start()));
}
MainWindow::start
{
SamplingThread samplingThread;
samplingThread.setFrequency( frequency() );
samplingThread.start();
}
int main( int argc, char **argv )
{
QApplication app( argc, …Run Code Online (Sandbox Code Playgroud) 我正在使用qt和qwt.我想绘制一个图表但我完全不熟悉它.有人可以给我一个链接来解释使用qwt的基本图表绘制吗?
谢谢
我的应用程序中有一个qwt图.我想展示一个小工具提示,以显示鼠标指向曲线的点的值.我发现我必须使用QwtPlotPicker,但在我的代码中找不到任何正确的示例来实现它.我是Qwt的新手,所以如果有人能帮我解决这个问题会很棒.
谢谢,拉克什.
我试图根据我已经获得并存储在矢量中的数据来绘制图形,但是,我似乎无法找到任何教程或参考,并且给我任何指示我需要做什么.所以这是我的代码:
class Plotter : public QwtPlot
{
public:
Plotter() {
}
};
int main( int argc, char **argv )
{
QApplication app(argc, argv);
//Plotter *d_plot = new Plotter();
Plotter* d_plot = new Plotter();
d_plot->setTitle("DEMO");
d_plot->setCanvasBackground(Qt::white);
d_plot->setAxisScale( QwtPlot::yLeft, 0.1, 50.0 );
d_plot->setAxisScale(QwtPlot::yRight, 0.1, 50.00);
// PLOT THE DATA
std::vector<double> data;
data.push_back(1.03);
data.push_back(13.12);
//....
d_plot->resize( 600, 400 );
d_plot->show();
return app.exec();
}
Run Code Online (Sandbox Code Playgroud)
任何人都可以给我任何想法,我可以使用什么功能来允许我绘制数据?
谢谢
我正在尝试使用一些Qwt小部件制作Qt 5应用程序,但是当我尝试链接Qwt库时,我看到Qt代码中的分段错误.我正在使用一个非常简单的Qt程序,它只弹出一个空白窗口:
#include <QApplication>
#include <QWidget>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget window;
window.resize(250, 150);
window.setWindowTitle("Simple example");
window.show();
return app.exec();
}
Run Code Online (Sandbox Code Playgroud)
这在我正常编译时工作正常.一旦我添加LIBS += -lqwt到我的.pro文件,问题就开始了.它仍然可以编译,但是当我尝试运行它时,即使没有调用Qwt代码也会出现分段错误.
回溯:
Program received signal SIGSEGV, Segmentation fault.
QList (this=0x3ea60da418 <QPrinterInfoPrivate::shared_null+24>) at ../../src/corelib/tools/qlist.h:121
121 inline QList() : d(&QListData::shared_null) { d->ref.ref(); }
(gdb) bt
#0 QList (this=0x3ea60da418 <QPrinterInfoPrivate::shared_null+24>) at ../../src/corelib/tools/qlist.h:121
#1 QPrinterInfoPrivate (name=..., this=0x3ea60da400 <QPrinterInfoPrivate::shared_null>) at painting/qprinterinfo_p.h:71
#2 __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at painting/qprinterinfo.cpp:35
#3 _GLOBAL__sub_I_qprinterinfo.cpp(void) () at painting/qprinterinfo.cpp:163
#4 0x0000003e9c20f2ea in call_init …Run Code Online (Sandbox Code Playgroud) 几个星期前我开始使用Qt,我真的非常喜欢它.我现在需要在我的应用程序中包含图形,经过一些研究,我发现Qwt是最好的方式(而不是自己从头开始做所有事情).我已经在这里工作了几天,我无法弄清楚如何安装它.我使用32位Windows7.我按照INSTALL文件中的说明操作:
来自cmd - >
qmake qwt.pro
nmake
Run Code Online (Sandbox Code Playgroud)
在nmake结束后,我留下了错误
C:\Users\Peyo\Downloads\qwt-6.0.1>qmake qwt.pro
C:\Users\Peyo\Downloads\qwt-6.0.1>nmake
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cd src\ && "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\nmake.e
xe" -f Makefile
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\nmake.exe" -f Make
file.Debug all
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
moc qwt_dyngrid_layout.h
moc qwt_magnifier.h
moc qwt_panner.h
moc …Run Code Online (Sandbox Code Playgroud) 我正在尝试按照作者说的编译程序(在这里找到:http://sourceforge.net/projects/lisem/).但是,在Qt Creator中编译时,它会给出错误:
class QWidget has no member named setFrameStyle
对于LisUIplot.cpp中的这些代码行
47 HPlot = new QwtPlot(title, this);
48 layout_Plot->insertWidget(0, HPlot, 1);
49 HPlot->canvas()->setFrameStyle(QFrame::StyledPanel);
Run Code Online (Sandbox Code Playgroud)
和
142 smallPlot = new QwtPlot(title, this);
143 smallPlot->setMinimumSize(300,300);
144 smallPlot->resize(500,500);
145 verticalLayout_6->insertWidget(0, smallPlot, 1);
146 smallPlot->canvas()->setFrameStyle(QFrame::StyledPanel);
Run Code Online (Sandbox Code Playgroud)
我希望你能帮助我.谢谢!
顺便说一句,我使用的是Qt 5.1.1 MinGW 32位和Qwt 6.1.0