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 convert QImage to SDL_Surface
Qt 6.11 is out! See what's new in the release blog

How to convert QImage to SDL_Surface

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 4.1k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    RTSP
    wrote on last edited by
    #1

    Here is My question:
    The buffer is m_data, and I use Qimage image = new QImage(m_data, w, h, 32,....) to create a QImage and use QPainter to display it in qt window. Can I use another function create a SDL_Surface from this m_data and use SDL function to display this m_data in the qt window?

    Thanks for your help.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mohsen
      wrote on last edited by
      #2

      may i ask what's the mean for using SDL Surface? do you need faster rendering? BTW, you can configure your Qt with SDL. also you may find examples at http://qt-apps.com

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RTSP
        wrote on last edited by
        #3

        Thank you very much. I just want to faster rendering image in qt, because I fount qpainter.drawImage cost cpu. Under the websit I could not fount the app about QT with SDL. Would you mind to give me a direct link of this?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mohsen
          wrote on last edited by
          #4

          here's a game which is mentioned SDL used for writing http://qt-apps.org/content/show.php/JAG?content=107652

          1 Reply Last reply
          0
          • R Offline
            R Offline
            RTSP
            wrote on last edited by
            #5

            I have look at this project and found this project only use SDL to decode audio. Anyway, thank you.

            1 Reply Last reply
            0

            • Login

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