You are not logged in.

#1 2025-12-13 10:59:23

jronald
Member
Registered: 2022-05-09
Posts: 198

qwt and qt6 not compatible

env

arch linux
qt 6.10.1
qwt 6.3.0-1

error message

QWidget: Must construct a QApplication before a QWidget

source codes
#include <qwt_plot_curve.h>
#include <qwt_plot.h>
#include <qapplication.h>

int main(int argc, char **argv)
{
    QApplication a(argc, argv);
    double x[101];
    double y[101];
    
    for ( int i = 0; i < 101; i++ ) {
        x[i] =  i / 10.0;
        y[i] = sin(x[i]);
    }
    
    QwtPlot plot;
    QwtPlotCurve *curve = new QwtPlotCurve();
    curve->setRawSamples(x, y, 101);
    curve->attach(&plot);
    plot.show();
    return a.exec();
}
more info

a few days ago, before some updates of qt, no error for the codes above.

Offline

#2 2025-12-13 12:10:13

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,565

Re: qwt and qt6 not compatible


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB