Qt Creator Using KDE class
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 :
Code:
/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
------------------
Code:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtDebug>
#include <kfontdialog.h>
namespace Ui {
class MainWindow;
}
{
Q_OBJECT
public:
explicit MainWindow
(QWidget *parent
= 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
mainwindow.cpp
------------------
Code:
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
int result = KFontDialog::getFont( myFont );
qDebug() << "Return Parameter is:" << result << endl;
}
MainWindow::~MainWindow()
{
delete ui;
}
Re: Qt Creator Using KDE class
Basically Qt5 and KDE 4 can't work together since KDE4 is based on Qt4.
Re: Qt Creator Using KDE class
kfontdialog Qt5 version is part of the "kde4support" framework, making it likely that it has been mostly replaced by its Qt counterpart and only still exists for porting and corner cases.
Cheers,
_