Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use SFML with Qt Creator?
Forum Update on Monday, May 27th 2025

How to use SFML with Qt Creator?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 4.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    acedawg45
    wrote on 5 Jun 2014, 18:24 last edited by
    #1

    NOTE: I didn't know whether or not to put this in Game Dev section, because SFML is usually for games (from what I've heard), but I put it here, since the question is based on using the libs with the IDE.

    With that out of the way, onto the question. I got SFML (the mingw version) earlier, extracted the file, and put it in the "Tools" subfolder in Qt directory (it is with the QtCreator folder and mingw48_32 folder). What do I do now? Can I even use SFML with Qt? Also, please be as clear as possible. I am in a lazy mood today and don't feel like reading gibberish.

    Any help == Great appreciation

    Oh, and here is the link to the downloads, if it helps.
    "Download Link":http://www.sfml-dev.org/download.php

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 5 Jun 2014, 21:40 last edited by
      #2

      Can you clarify? Do you mean you want to mix SFML with Qt (the library) or use it in Qt Creator (the IDE) without Qt?

      If it's the former then which features exactly do you need? Qt has its own event loop and I don't know SFML, but I suspect it has its own too? Some of the features might be compatible (like QString) and others might not (like the widgets). It all depends on which features from these libs do you need, because they in many ways overlap the same functionality. I suspect SFML offers a very limited subset of what Qt can do.

      If it's the latter then you use it like any other external library: edit your .pro file and add SFML headers location to INCLUDEPATH, .lib (or .a in case of MinGW) to the LIBS and (if linking dynamically) put the dlls in the output folder.

      Also, don't put custom libraries in Qt installations folders.
      It's like putting it in C:\Program Files\Adobe\Reader...
      I mean you can, but it's not the best idea.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        acedawg45
        wrote on 5 Jun 2014, 22:36 last edited by
        #3

        Well, I am going to start game development (learning it) and SFML is what I am going with. I want to use it in the IDE, not the QML. So, just a regular C++ project. THanks for the answer. And just saying, I did mention the Qt Creator in the question, in case you missed it.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on 5 Jun 2014, 23:20 last edited by
          #4

          You did, but then you asked "Can I even use SFML with Qt?" so...
          And then you say "I want to use it in the IDE, not the QML" and it's like saying "I want to use it in the notepad, not the python" so you seem to be mixing some stuff.

          Anyway, best of luck. There shouldn't be a problem with using SFML in a qt-less program.
          Just remember to add QT -= core in the .pro file so that the linker won't try to link to Qt libraries.

          1 Reply Last reply
          0

          1/4

          5 Jun 2014, 18:24

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved