Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Is it possible use QML Drawer and SwipeView types as QWidgets?
Forum Updated to NodeBB v4.3 + New Features

Is it possible use QML Drawer and SwipeView types as QWidgets?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 3 Posters 1.8k 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.
  • G Offline
    G Offline
    Gourmet
    wrote on last edited by Gourmet
    #1

    I create Qt apps using widgets since 1997. The QML is not useful for me. As I understand it was built over QWidgets and uses them under cover. Therefore QWidget based app I prefer as more economical and compact. Now I want create Android app with swipe based interface controls like Drawer and SwipeView QML types. But I do not see widget-based implementation of them both. I would expect QDrawer::QWidget class and something like QStackedWidget for SimpleView implementation. But they are not exist. May be it is implemented in some other manner, is it?

    If it is not possible use them both as widgets - then I will ask another question. How properly add these QML types to already designed and working widget-based application?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by dheerendra
      #2

      QML is no more above the QWidgets. Now it is completely different and OpenGL based. You can use QML type and put widget wrapper using QWidget::createWindowContainer(..) function. There is NO widget based Swipe and drawer.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      G 1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        QtQuick 1 was not on top of QWidget but used the graphics view framework. There never was a QWidget based drawer for QtQuick.

        Your best bet in this case as @dheerendra suggests is to go the other way around and use QtQuick stuff in your widget based application.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • dheerendraD dheerendra

          QML is no more above the QWidgets. Now it is completely different and OpenGL based. You can use QML type and put widget wrapper using QWidget::createWindowContainer(..) function. There is NO widget based Swipe and drawer.

          G Offline
          G Offline
          Gourmet
          wrote on last edited by
          #4

          @dheerendra said in Is it possible use QML Drawer and SwipeView types as QWidgets?:

          QML is no more above the QWidgets. Not is completely different and OpenGL based. You can use QML type and put widget wrapper using QWidget::createWindowContainer(..) function.

          Ok, thanx, I read about this and looks like it is possible solution. But:

          There are widget based Swipe and drawer.

          If you are talking about Qt::Drawer then AFIAK this works only in MacOSX. But I create app for Android. If there is any other widget based drawer - then how to use it in Android?

          G 1 Reply Last reply
          0
          • G Gourmet

            @dheerendra said in Is it possible use QML Drawer and SwipeView types as QWidgets?:

            QML is no more above the QWidgets. Not is completely different and OpenGL based. You can use QML type and put widget wrapper using QWidget::createWindowContainer(..) function.

            Ok, thanx, I read about this and looks like it is possible solution. But:

            There are widget based Swipe and drawer.

            If you are talking about Qt::Drawer then AFIAK this works only in MacOSX. But I create app for Android. If there is any other widget based drawer - then how to use it in Android?

            G Offline
            G Offline
            Gourmet
            wrote on last edited by Gourmet
            #5

            And what if I need another widget inside QML Drawer? I just describe - There will be QListWidget on screen and I need another QListWidget on drawer dragable from screen side. QML In this drawer list items will be able to reorder by drag-n-drop. Drawer usage looks too much complex, quite redundantly.

            I am frustrating. Why there is no just QDrawer class working in all supported platforms?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Because drawer as you see them is a pretty recent GUI addition that is pretty much exclusive to the mobile OS window management with the exception of macOS for some of their dialogs.

              You already have the QtQuick Controls 2 for desktop like controls in QML.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              G 1 Reply Last reply
              0
              • SGaistS SGaist

                Because drawer as you see them is a pretty recent GUI addition that is pretty much exclusive to the mobile OS window management with the exception of macOS for some of their dialogs.

                You already have the QtQuick Controls 2 for desktop like controls in QML.

                G Offline
                G Offline
                Gourmet
                wrote on last edited by
                #7

                @SGaist this could be very good addition for other desktop OSes not having this feature. Without this it is not possible create truly multiplatform software.

                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