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 :
Qt Code:
  1. /usr/include/kconfiggroup.h:745: error: 'qVariantCanConvert' was not declared in this scope
To copy to clipboard, switch view to plain text mode 

I have seen that qVariantCanConvert is deprecated.

The project build correctly under 4.8.

Any help is welcome.


mainwindow.h
------------------
Qt Code:
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3.  
  4. #include <QMainWindow>
  5. #include <QtDebug>
  6. #include <kfontdialog.h>
  7.  
  8. namespace Ui {
  9. class MainWindow;
  10. }
  11.  
  12. class MainWindow : public QMainWindow
  13. {
  14. Q_OBJECT
  15.  
  16. public:
  17. explicit MainWindow(QWidget *parent = 0);
  18. ~MainWindow();
  19.  
  20. private:
  21. Ui::MainWindow *ui;
  22. };
  23.  
  24. #endif // MAINWINDOW_H
To copy to clipboard, switch view to plain text mode 

mainwindow.cpp
------------------
Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3.  
  4. MainWindow::MainWindow(QWidget *parent) :
  5. QMainWindow(parent),
  6. ui(new Ui::MainWindow)
  7. {
  8. ui->setupUi(this);
  9.  
  10.  
  11. QFont myFont;
  12. int result = KFontDialog::getFont( myFont );
  13. qDebug() << "Return Parameter is:" << result << endl;
  14.  
  15.  
  16. }
  17.  
  18. MainWindow::~MainWindow()
  19. {
  20. delete ui;
  21. }
To copy to clipboard, switch view to plain text mode