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 add pictures to a qt widget table in qt
Forum Updated to NodeBB v4.3 + New Features

how to add pictures to a qt widget table in qt

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 3 Posters 1.7k Views 2 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.
  • SGaistS SGaist

    Well, user management systems are often coupled with web technologies.

    Is it your case ?

    As for getting data into widget, QDataWidgetMapper comes to mind.

    T Offline
    T Offline
    the_owler
    wrote on last edited by
    #8

    @SGaist and is it possible to put pictures inside QDataWidgetMapper ?

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

      QDataWidgetMapper does the link between widgets and database fields.

      How are you storing images in that database ?

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

      T 1 Reply Last reply
      0
      • SGaistS SGaist

        QDataWidgetMapper does the link between widgets and database fields.

        How are you storing images in that database ?

        T Offline
        T Offline
        the_owler
        wrote on last edited by
        #10

        @SGaist its a mysql server with a database
        i am using c++ connector
        and reading a pic image binary and store it inside the database in a longblob or blob var type

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

          Is the format of the picture fixed ?

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

          T 1 Reply Last reply
          1
          • SGaistS SGaist

            Is the format of the picture fixed ?

            T Offline
            T Offline
            the_owler
            wrote on last edited by
            #12

            sorry for late xD 600 second cooldown
            @SGaist u mean by fixed is that a single format ? like png or jpg ?
            if so no it wwill be just one format
            and its controlable by the user

            *its a desktop app that is controlable by just one user so the format type is not an issue

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

              Will you use a QTableView ? If so you can either use a custom QIdentityProxyModel that will create a QPixmap from the blob for the DecorationRole or a custom QStyledItemDelegate to draw the blob.

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

              T 1 Reply Last reply
              1
              • SGaistS SGaist

                Will you use a QTableView ? If so you can either use a custom QIdentityProxyModel that will create a QPixmap from the blob for the DecorationRole or a custom QStyledItemDelegate to draw the blob.

                T Offline
                T Offline
                the_owler
                wrote on last edited by
                #14

                @SGaist you think qtableview is the best way to show the data ? or there is other better way to do it
                if not thank you so much
                that was very helpful <3

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

                  It depends on how you want your user to access the data.

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

                  T 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    It depends on how you want your user to access the data.

                    T Offline
                    T Offline
                    the_owler
                    wrote on last edited by
                    #16

                    i want something like this picture :
                    Student Management System
                    with some pics on each student

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

                      This looks like a classic web application.

                      While you can do the front end with Qt, I think you should first rethink your backend architecture to provide all the services needed to manage such an 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
                      • T Offline
                        T Offline
                        the_owler
                        wrote on last edited by
                        #18

                        thank you so much <3

                        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