Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QPaint and QBitmap

    Mobile and Embedded
    2
    7
    2423
    Loading More Posts
    • 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.
    • V
      Vetryaspa last edited by

      Hi all,

      I have an application where i have to implement a list of Objects but the list is very long and i have to implement a Cinetic scroll. I saw the Flicker sample about the cinetic scroll but in this sample the list's elements were Painted with QPaint class.

      i have to insert some images in my list's row. is there a methot to paint the Image?--

      regards

      1 Reply Last reply Reply Quote 0
      • A
        andre last edited by

        I don't understand the question. Note that there is no QPaint class, though there is a [[doc:QPainter]] class. Could you perhaps provide a sketch of what you are after?

        1 Reply Last reply Reply Quote 0
        • V
          Vetryaspa last edited by

          Sorry.... I have seen only now...

          Qpainter class.... in short I have to paint an immage... whit painter

          1 Reply Last reply Reply Quote 0
          • A
            andre last edited by

            QPainter::drawImage is not what you are after then?

            1 Reply Last reply Reply Quote 0
            • V
              Vetryaspa last edited by

              I have found now method!! i try to test it and post ^^ tnx :)

              1 Reply Last reply Reply Quote 0
              • V
                Vetryaspa last edited by

                I have try to paint immage but without result.

                I have the immage inside the Resources in my Qt-Project and i try this code:

                @ QImage *classifica = new QImage(QSize(35,29),QImage::Format_RGB32) ;
                QString fileName = QFileDialog::getOpenFileName(this, ":/new/lista/Grafiche/LegendBig/forchetta.png");
                classifica->load(fileName);
                p.drawImage(QPoint(180,y+71) ,*classifica);@

                but return this error:

                @Thread has crashed: Thread 0x595 has panicked. Category: WSERV; Reason: 10
                Thread has crashed: Thread 0x596 has panicked. Category: WSERV; Reason: 10@

                1 Reply Last reply Reply Quote 0
                • V
                  Vetryaspa last edited by

                  ok I have modify and now work :

                  @ QImage *classifica = new QImage(QSize(35,29),QImage::Format_ARGB32_Premultiplied) ;
                  QString fileName(":/new/lista/Grafiche/LegendBig/gamberi_3.png");
                  classifica->load(fileName);
                  p.drawImage(QPoint(215,y+62) ,*classifica);@

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post