Russian Qt Forum
Май 06, 2024, 01:12 *
Добро пожаловать, Гость. Пожалуйста, войдите или зарегистрируйтесь.
Вам не пришло письмо с кодом активации?

Войти
 
  Начало Форум WIKI (Вики)FAQ Помощь Поиск Войти Регистрация  
  Просмотр сообщений
Страниц: [1]
1  Qt / 2D и 3D графика / QWT в jpg или png : Июнь 15, 2022, 16:35
Не получается у меня получить качественное изображение в высоком качестве.
Написал следующий код:
Код:
QwtPlot *d_plot = new QwtPlot(NULL);
 
d_plot->setTitle( "Изменение емкости аккумулятора" ); // заголовок
d_plot->setCanvasBackground( Qt::white ); // цвет фона
// Параметры осей координат
d_plot->setAxisTitle(QwtPlot::yLeft, "А/ч");
d_plot->setAxisTitle(QwtPlot::xBottom, "t");
d_plot->insertLegend( new QwtLegend() );
// Включить сетку
QwtPlotGrid *grid = new QwtPlotGrid();
grid->setMajorPen(QPen( Qt::gray, 2 )); // цвет линий и толщина
grid->attach( d_plot ); // добавить сетку к полю графика
// Кривая
QwtPlotCurve *curve = new QwtPlotCurve();
curve->setPen( Qt::blue, 6 ); // цвет и толщина кривой
curve->setRenderHint( QwtPlotItem::RenderAntialiased, true ); // сглаживание
// Маркеры кривой
QwtSymbol *symbol = new QwtSymbol( QwtSymbol::Ellipse, QBrush( Qt::yellow ), QPen( Qt::red, 2 ), QSize( 8, 8 ) );
curve->setSymbol( symbol );
// Добавить точки на ранее созданную кривую
QPolygonF points;
points << QPointF( 0.0, 0.0 ) << QPointF( 1.0, 1.0 ) // координаты x, y
       << QPointF( 1.5, 2.0 ) << QPointF( 3.0, 2.0 )
       << QPointF( 3.5, 3.0 ) << QPointF( 5.0, 3.0 );
 
curve->setSamples( points ); // ассоциировать набор точек с кривой
curve->attach( d_plot ); // отобразить кривую на графике
 
QPixmap pixmap(1024,600);
pixmap = QPixmap::grabWidget(d_plot);
QPainter *painter=new QPainter(&pixmap);
QwtPlotRenderer rend;
d_plot->replot();
rend.render(d_plot,painter,d_plot->geometry());
QFile file("Dene.jpg");
file.open(QIODevice::WriteOnly);
pixmap.save(&file, "jpg", 100);
file.close();
2  Qt / Model-View (MV) / Как можно изменять размеры столбцов qtableView с использованием Delegate? : Май 23, 2020, 20:00
Цель сделать автоматический перенос текста при фиксированных размерах столбцов. Начал делать и столкнулся с первой проблемой.
1.Размеры столбцов должны равняться размеру выводимой информации. А так получается что "дата время" не вписывается в столбец "Дата", а вылазят за пределы.
Что сделал:
Код:
    ui->tableView->setModel(model);
    ui->tableView->setItemDelegate(new TableViewColumnDelegate(this));
    ui->tableView->setWordWrap(true);
    ui->tableView->setTextElideMode(Qt::ElideNone);
    ui->tableView->setFont(font);

    [b]//ui->tableView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); // думал этого хватит, но оказалось нет
    ui->tableView->resizeColumnToContents(0);
    ui->tableView->resizeColumnToContents(1);
    ui->tableView->horizontalHeader()->setResizeMode(0, QHeaderView::Fixed);
    ui->tableView->horizontalHeader()->setResizeMode(1, QHeaderView::Fixed);
    ui->tableView->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch);[/b]
Добавил делегейт "QStyledItemDelegate":
Код:
void TableViewColumnDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
    if(!index.isValid())
           return;
       painter->save();

       if (option.state & QStyle::State_Selected){
           painter->fillRect(option.rect, option.palette.highlight());
       }

       QString Text = index.data().toString();
       qDebug() << "Text" << Text;

       QFont Font = QApplication::font();
       QFontMetrics Fm(Font);
       QRect Rect = Fm.boundingRect(option.rect.left(), option.rect.top() ,
                                     option.rect.width(),  option.rect.height(),
                                     Qt::AlignLeft|Qt::AlignTop|Qt::TextWordWrap,
                                     Text);
       painter->setPen(Qt::black);
       painter->setFont(Font);
       painter->drawText(Rect, Qt::AlignLeft|Qt::AlignTop|Qt::TextWordWrap, Text);
       painter->restore();
}

QSize TableViewColumnDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
    if(!index.isValid())
        return QSize();
    QString Text = index.data().toString();
    QFont Font = QApplication::font();
    QFontMetrics Fm(Font);
    QRect Rect = Fm.boundingRect(0, 0, option.rect.width(), 0,
                                             Qt::AlignLeft|Qt::AlignTop|Qt::TextWordWrap,
                                             Text);
    QSize size(option.rect.width(), Rect.height());
    return size;
}
Получил:

3  Qt / 2D и 3D графика / qwt отображение по оси абсцисс даты времени : Март 01, 2020, 18:00
В .log пишу состояние сенсора. Запись произвожу раз в час, то есть дискрет между точками равен 60 минутам. Запись циклическая с периодом 1 год. Вот и возникает вопрос как можно в qwt по оси абсцисс отобразить время вместо точек дискретизации? Для удобства чтения.
4  Qt / Вопросы новичков / Как сделать вторичный поток с постоянный жизненным циклом и управлением из главн : Ноябрь 24, 2019, 14:55
Имеется объект, который живёт в другом потоке и выполняет различные задачи по запросам или выполняет повторяющиеся задачи.

Более приземленное описание. Через протокол modbus RTU опрашиваются датчики. Датчиков 247 штук. Используются 3 команды, чтение регистров, запись регистров, чтение ID. Управление датчиками может быть ручное или автоматическое. При ручном режиме принимаем данные из главного потока и передаем на датчик, после ответа датчика передаем данные в главный поток для записи в usb устройство и отображение на экране. При автоматическом режиме управляем датчиками по заданному алгоритму и отсылаем ответы датчиков в главный поток для записи на usb устройство и отображения данных.

Вот не знаю как лучше реализовать это.
5  Qt / Вопросы новичков / QDialog как удалить title bar : Сентябрь 28, 2019, 07:53
Привет.

Подскажите как можно удалить title bar из QDialog?
6  Qt / Вопросы новичков / Как объединить время и дату в label : Сентябрь 17, 2019, 17:44
Привет.
Подскажите как можно объединить время и дату.
Написал вот такой код:
Код:
    ui->label_2->setText(QTime::currentTime().toString("hh:mm:ss"));
    ui->label_2->setText(QDate::currentDate().toString("dd:MM:yy"));
Дата выводиться а времени нет. Хочу, чтобы время было сверху а дата снизу.
7  Qt / 2D и 3D графика / qcustomplot предупреждения при сборки проекта : Сентябрь 05, 2019, 18:17
Привет.

Подключил qcustomplot к проекту как написано в документации.

После сборки получаю предупреждения.

Код:
In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qvariant.h:49:0,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmimedata.h:45,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qmime.h:45,
                 from ../../work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qevent.h:52,
                 from ../../work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPaintEvent:1,
                 from ../tion28/qcustomplot.h:33,
                 from ../tion28/qcustomplot.cpp:26:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmap.h: In member function ‘QMap<Key, T>::iterator QMap<Key, T>::erase(QMap<Key, T>::iterator) [with Key = double; T = QCPData]’:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmap.h:717:54: note: parameter passing for argument of type ‘QMap<double, QCPData>::iterator’ changed in GCC 7.1
 Q_OUTOFLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::erase(iterator it)
                                                      ^~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPGraph::removeDataBefore(double)’:
../tion28/qcustomplot.cpp:14918:8: note: parameter passing for argument of type ‘QMap<double, QCPData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPGraph::removeDataAfter(double)’:
../tion28/qcustomplot.cpp:14930:8: note: parameter passing for argument of type ‘QMap<double, QCPData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPGraph::removeData(double, double)’:
../tion28/qcustomplot.cpp:14946:8: note: parameter passing for argument of type ‘QMap<double, QCPData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qvariant.h:49:0,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmimedata.h:45,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qmime.h:45,
                 from ../../work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qevent.h:52,
                 from ../../work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPaintEvent:1,
                 from ../tion28/qcustomplot.h:33,
                 from ../tion28/qcustomplot.cpp:26:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmap.h: In member function ‘QMap<Key, T>::iterator QMap<Key, T>::erase(QMap<Key, T>::iterator) [with Key = double; T = QCPCurveData]’:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmap.h:717:54: note: parameter passing for argument of type ‘QMap<double, QCPCurveData>::iterator’ changed in GCC 7.1
 Q_OUTOFLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::erase(iterator it)
                                                      ^~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPCurve::removeDataBefore(double)’:
../tion28/qcustomplot.cpp:16990:8: note: parameter passing for argument of type ‘QMap<double, QCPCurveData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPCurve::removeDataAfter(double)’:
../tion28/qcustomplot.cpp:17002:8: note: parameter passing for argument of type ‘QMap<double, QCPCurveData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPCurve::removeData(double, double)’:
../tion28/qcustomplot.cpp:17018:8: note: parameter passing for argument of type ‘QMap<double, QCPCurveData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qvariant.h:49:0,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmimedata.h:45,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qmime.h:45,
                 from ../../work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qevent.h:52,
                 from ../../work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPaintEvent:1,
                 from ../tion28/qcustomplot.h:33,
                 from ../tion28/qcustomplot.cpp:26:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmap.h: In member function ‘QMap<Key, T>::iterator QMap<Key, T>::erase(QMap<Key, T>::iterator) [with Key = double; T = QCPBarData]’:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmap.h:717:54: note: parameter passing for argument of type ‘QMap<double, QCPBarData>::iterator’ changed in GCC 7.1
 Q_OUTOFLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::erase(iterator it)
                                                      ^~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPBars::removeDataBefore(double)’:
../tion28/qcustomplot.cpp:18694:8: note: parameter passing for argument of type ‘QMap<double, QCPBarData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPBars::removeDataAfter(double)’:
../tion28/qcustomplot.cpp:18706:8: note: parameter passing for argument of type ‘QMap<double, QCPBarData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPBars::removeData(double, double)’:
../tion28/qcustomplot.cpp:18722:8: note: parameter passing for argument of type ‘QMap<double, QCPBarData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qvariant.h:49:0,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmimedata.h:45,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qmime.h:45,
                 from ../../work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qevent.h:52,
                 from ../../work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPaintEvent:1,
                 from ../tion28/qcustomplot.h:33,
                 from ../tion28/qcustomplot.cpp:26:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmap.h: In member function ‘QMap<Key, T>::iterator QMap<Key, T>::erase(QMap<Key, T>::iterator) [with Key = double; T = QCPFinancialData]’:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qmap.h:717:54: note: parameter passing for argument of type ‘QMap<double, QCPFinancialData>::iterator’ changed in GCC 7.1
 Q_OUTOFLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::erase(iterator it)
                                                      ^~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPFinancial::removeDataBefore(double)’:
../tion28/qcustomplot.cpp:20858:8: note: parameter passing for argument of type ‘QMap<double, QCPFinancialData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPFinancial::removeDataAfter(double)’:
../tion28/qcustomplot.cpp:20871:8: note: parameter passing for argument of type ‘QMap<double, QCPFinancialData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);
     ~~~^~~~~~~~~~~~~~~~~~
../tion28/qcustomplot.cpp: In member function ‘void QCPFinancial::removeData(double, double)’:
../tion28/qcustomplot.cpp:20887:8: note: parameter passing for argument of type ‘QMap<double, QCPFinancialData>::iterator’ changed in GCC 7.1
     it = mData->erase(it);

Пробовал разные версии не помогло. Что можно еще сделать?
8  Qt / Вопросы новичков / Подключил к проекту библиотеку QCustomPlot после получил предупреждения : Август 11, 2019, 08:24
Привет.

Подключил библиотеку QCustomPlot как написано в http://blog.harrix.org/article/1813 после получил предупреждения

Код:
tion28-pro/qcustomplot.cpp
../tion28-pro/qcustomplot.cpp: In member function ‘virtual QPointF QCPItemRect::anchorPixelPosition(int) const’:
../tion28-pro/qcustomplot.cpp:28765:65: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
     case aiTop:         return (rect.topLeft()+rect.topRight())*0.5;
                                                                 ^~~
In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qrect.h:46:0,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qpainter.h:46,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPainter:1,
                 from ../tion28-pro/qcustomplot.h:54,
                 from ../tion28-pro/qcustomplot.cpp:26:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qpoint.h:349:22: note: candidate 1: const QPointF operator*(const QPointF&, qreal)
 inline const QPointF operator*(const QPointF &p, qreal c)
                      ^~~~~~~~
In file included from ../tion28-pro/qcustomplot.cpp:26:0:
../tion28-pro/qcustomplot.h:439:26: note: candidate 2: const QCPVector2D operator*(const QCPVector2D&, double)
 inline const QCPVector2D operator*(const QCPVector2D &vec, double factor) { return QCPVector2D(vec.mX*factor, vec.mY*factor); }
                          ^~~~~~~~
../tion28-pro/qcustomplot.cpp:28767:69: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
     case aiRight:       return (rect.topRight()+rect.bottomRight())*0.5;
                                                                     ^~~
In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qrect.h:46:0,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qpainter.h:46,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPainter:1,
                 from ../tion28-pro/qcustomplot.h:54,
                 from ../tion28-pro/qcustomplot.cpp:26:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qpoint.h:349:22: note: candidate 1: const QPointF operator*(const QPointF&, qreal)
 inline const QPointF operator*(const QPointF &p, qreal c)
                      ^~~~~~~~
In file included from ../tion28-pro/qcustomplot.cpp:26:0:
../tion28-pro/qcustomplot.h:439:26: note: candidate 2: const QCPVector2D operator*(const QCPVector2D&, double)
 inline const QCPVector2D operator*(const QCPVector2D &vec, double factor) { return QCPVector2D(vec.mX*factor, vec.mY*factor); }
                          ^~~~~~~~
../tion28-pro/qcustomplot.cpp:28768:71: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
     case aiBottom:      return (rect.bottomLeft()+rect.bottomRight())*0.5;
                                                                       ^~~
In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qrect.h:46:0,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qpainter.h:46,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPainter:1,
                 from ../tion28-pro/qcustomplot.h:54,
                 from ../tion28-pro/qcustomplot.cpp:26:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qpoint.h:349:22: note: candidate 1: const QPointF operator*(const QPointF&, qreal)
 inline const QPointF operator*(const QPointF &p, qreal c)
                      ^~~~~~~~
In file included from ../tion28-pro/qcustomplot.cpp:26:0:
../tion28-pro/qcustomplot.h:439:26: note: candidate 2: const QCPVector2D operator*(const QCPVector2D&, double)
 inline const QCPVector2D operator*(const QCPVector2D &vec, double factor) { return QCPVector2D(vec.mX*factor, vec.mY*factor); }
                          ^~~~~~~~
../tion28-pro/qcustomplot.cpp:28770:67: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
     case aiLeft:        return (rect.topLeft()+rect.bottomLeft())*0.5;
                                                                   ^~~
In file included from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qrect.h:46:0,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/qpainter.h:46,
                 from /home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtGui/QPainter:1,
                 from ../tion28-pro/qcustomplot.h:54,
                 from ../tion28-pro/qcustomplot.cpp:26:
/home/alexey/work1/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/QtCore/qpoint.h:349:22: note: candidate 1: const QPointF operator*(const QPointF&, qreal)
 inline const QPointF operator*(const QPointF &p, qreal c)
                      ^~~~~~~~
In file included from ../tion28-pro/qcustomplot.cpp:26:0:
../tion28-pro/qcustomplot.h:439:26: note: candidate 2: const QCPVector2D operator*(const QCPVector2D&, double)
 inline const QCPVector2D operator*(const QCPVector2D &vec, double factor) { return QCPVector2D(vec.mX*factor, vec.mY*factor); }
                          ^~~~~~~~
../tion28-pro/qcustomplot.cpp: In member function ‘virtual QPointF QCPItemText::anchorPixelPosition(int) const’:
../tion28-pro/qcustomplot.cpp:29065:64: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
     case aiTop:         return (rectPoly.at(0)+rectPoly.at(1))*0.5;

Что с ними делать не ясно и на сколько это критично тоже не ясно.

Процессор imx287 система собрана из buildroot. Qt версии 4,8,7.
Страниц: [1]

Страница сгенерирована за 0.051 секунд. Запросов: 24.