Porting KWidgets to Qt5

Frank Reininghaus frank78ac at googlemail.com
Tue Jul 10 09:05:15 UTC 2012


Hi,

2012/7/9 Иван Комиссаров:
> I answered to them. They disagree with them in that case. For me is biggest
> priority is to port as much kde as code as possible.

getting code upstream into Qt is good, of course, but you can't expect
that the Qt people will accept KDE code without modifications. If they
have good suggestions how to make the API better and more general, you
should take this into account, e.g., Jeremy's idea to just have a
'tabClicked()' signal with a 'mouse button' argument. One could even
go further and add a 'keyboard modifiers' argument. Things like this
make the API more versatile and future-proof.

Some evidence to support that: QAction's triggered() signal yields no
info about how the action was triggered [1], which makes it impossible
to react to middle-clicks or Control-clicks on, e.g., toolbar buttons,
in a special way. Therefore, KAction has another triggered() signal
that has information about mouse buttons and keyboard modifiers [2].
This wouldn't be necessary if QAction had been written in a more
general way.

Best regards,
Frank

[1] http://doc-snapshot.qt-project.org/5.0/qaction.html#triggered
[2] http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKAction.html#a47c884a5a7b9b22555584553fd5552a8


More information about the Kde-frameworks-devel mailing list