Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Porting Qt-based UI to QML
QtWS25 Last Chance

Porting Qt-based UI to QML

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 2.3k 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.
  • C Offline
    C Offline
    cristeab
    wrote on last edited by
    #1

    Hi

    I have an e-book reader using a custom version of QStackedWidget for showing pages. How can I use my custom widget in a QML script ? I would like to be able to reuse as much code as possible for the UI.

    thanks
    Bogdan

    1 Reply Last reply
    0
    • D Offline
      D Offline
      diro
      wrote on last edited by
      #2

      Actually, I think rewrite it in QML would be much easier and more elegance than wrap your QStackedWidget into QML (with z-index, x, y and some animation element...)
      Besides, in Qt5, I think the performance would be better, too.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cristeab
        wrote on last edited by
        #3

        yes, it seems the best option

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jens
          wrote on last edited by
          #4

          This is true. The closest you can get to re-using widget code is to port your QWidget into QQuickPaintedItem. This will at least allow you to re-use your qpainter drawing code. We are working on making it possible to embed qtquick 2 inside QWidget. This would make it possible to at least partially make use of qt quick in your application. This is will happen in 5.1 earliest.

          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