jcdole
21st October 2013, 10:44
Hello.
Qt 5.1.1
Qt Creator 2.8.1
KDE 4.10.5
OpenSuse 12.3
Linux 3.7.10-1.16-desktop
I would like to use KFontDialog
I cannot build my project under 5.1.1 because of this error :
/usr/include/kconfiggroup.h:745: error: 'qVariantCanConvert' was not declared in this scope
I have seen that qVariantCanConvert is deprecated.
The project build correctly under 4.8.
Any help is welcome.
mainwindow.h
------------------
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtDebug>
#include <kfontdialog.h>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
mainwindow.cpp
------------------
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QFont myFont;
int result = KFontDialog::getFont( myFont );
qDebug() << "Return Parameter is:" << result << endl;
}
MainWindow::~MainWindow()
{
delete ui;
}
Qt 5.1.1
Qt Creator 2.8.1
KDE 4.10.5
OpenSuse 12.3
Linux 3.7.10-1.16-desktop
I would like to use KFontDialog
I cannot build my project under 5.1.1 because of this error :
/usr/include/kconfiggroup.h:745: error: 'qVariantCanConvert' was not declared in this scope
I have seen that qVariantCanConvert is deprecated.
The project build correctly under 4.8.
Any help is welcome.
mainwindow.h
------------------
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtDebug>
#include <kfontdialog.h>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
mainwindow.cpp
------------------
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QFont myFont;
int result = KFontDialog::getFont( myFont );
qDebug() << "Return Parameter is:" << result << endl;
}
MainWindow::~MainWindow()
{
delete ui;
}