SFML community forums
General => SFML projects => Topic started by: korczurekk on May 03, 2016, 12:40:07 am
-
(https://raw.githubusercontent.com/KoczurekK/QSFML/master/logo/qsfml-small.png)
Hi!
Propably everyone interested in integrating Qt & SFML read that post: (http://becomingindiedev.blogspot.com/2013/10/qt-5-and-sfml-20-integration.html). Unfortunately, it's very basic widget, that doesn't allow writing complex applications too fast.
I decided to fork it and add some useful (IMO ofc) features, at this point i've added that:
- OnUpdate function takes length of last frame so writing much smoother applications is easier.
- Mouse events handling.
- Keyboard events handling
(only alphabet letters, numbers, space, enter, backspace and backslash, i will add better support tomorrow). - Funtion that converts Qt key code to SFML key code (same limit as in keyboard events handling)
Here's GitHub repo: https://github.com/KoczurekK/QSFML
What do you guys think? Btw in my country it's 0:30 AM, so don't blame me for my bad english. ;)
EDIT: Propably every key event is handled (almost) ok, you can check out that: https://github.com/KoczurekK/QSFML/blob/master/QSFML/keyconverter.cpp and tell me if i made some mistake.
Update (21 August 2016):
- Working universal class compatybile with sf::String and QString.
- New logo, "highly" inspired by SFML's and Qt's ones.
-
Cool! :)
What OS has you tested this on?
-
Ubuntu 16.04, i'm too lazy to install Windows, so somebody can test it on it. ;)
Some new features:
- Everything is in qfs namespace.
- Support for Qt resources with QResourceStream that inherits sf::InputStream.
-
Update:
- Just added the class qsf::ResourceStream that inherits sf::InputStream and can read Qt resources. It allows you to hide fonts etc. in a binary file.
- Separated .hpp & .cpp files and added .pro file so qmake is enough to compile program.
-
It took me pretty much to draft new release on github. ;D
A few features in v1.2.0:
- Added 2 examples (spinning-numbers, date);
- Refactored #includes;
- Resize event support;
- Rewritten qsf::String;
- Project logo.
Debian builds ship with precompiled SFML 2.4.1 (also debian package) in both release and debug versions.