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. QML button to print Sqlite db form
Forum Updated to NodeBB v4.3 + New Features

QML button to print Sqlite db form

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 3 Posters 1.6k Views 3 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.
  • F Offline
    F Offline
    filipdns
    wrote on last edited by
    #1

    Hello guys,

    Any one know how can I print the db from qml button?
    I did project following local storage from QT but now my db is fill out and I would like go far away with make form probably in js and make pdf with button on my qml page.

    Thank you for your help

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I think you have to use c++
      (unleass they added it later)
      https://forum.qt.io/topic/57861/solved-how-to-take-a-print-in-qml

      F 1 Reply Last reply
      2
      • mrjjM mrjj

        Hi
        I think you have to use c++
        (unleass they added it later)
        https://forum.qt.io/topic/57861/solved-how-to-take-a-print-in-qml

        F Offline
        F Offline
        filipdns
        wrote on last edited by filipdns
        #3

        @mrjj Thank a lot, as I understand in this link, they are printing a "screen shot" but it not my need.

        My project has 3 tables each one for different thing and I'm looking to print all tables and be able to custom the "style"

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

          Hi @filipdns

          To add to @mrjj

          I think that you have to use c++ too , with printer and printing api

          I hope this can help you

          1 Reply Last reply
          2
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi
            In that sample they print image but its the same way you print your form by accessing the data
            and "draw" it on printer object as pdf or paper.

            M 1 Reply Last reply
            2
            • mrjjM mrjj

              Hi
              In that sample they print image but its the same way you print your form by accessing the data
              and "draw" it on printer object as pdf or paper.

              M Offline
              M Offline
              mostefa
              wrote on last edited by
              #6

              @mrjj said in QML button to print Sqlite db form:

              Hi
              In that sample they print image but its the same way you print your form by accessing the data
              and "draw" it on printer object as pdf or paper.

              @filipdns

              You can also be interested with this wiki , it's about printing a QTextDocument to PDF !

              1 Reply Last reply
              2
              • F Offline
                F Offline
                filipdns
                wrote on last edited by
                #7

                Thanks a lot, I will try that and give feedback ;-)

                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