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. QPainter::begin: Paint device returned engine == 0, type: 2

QPainter::begin: Paint device returned engine == 0, type: 2

Scheduled Pinned Locked Moved General and Desktop
14 Posts 5 Posters 30.4k 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.
  • Z Offline
    Z Offline
    ZapB
    wrote on last edited by
    #5

    I have tried it here (Gentoo Linux, Qt 4.7.2, raster paint engine) and I get no warnings at all from your example.

    What version of Qt are you using? Did you build it yourself or is it a pre-compiled binary distribution of Qt? What paint engine are you using?

    Nokia Certified Qt Specialist
    Interested in hearing about Qt related work

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hsfougaris
      wrote on last edited by
      #6

      I am running under Windows 7/64 bit with QtCreator 2.1.
      I am using the pre-compiled binary distribution from Qt.

      Paint engine? I don't know what you mean... I haven't done anything to explicitly use a particular engine.

      If you can't say what you mean, you'll never be able to mean what you say.

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        ZapB
        wrote on last edited by
        #7

        OK so you are likely using the raster paint engine then as that is the default on Windows.

        Which version of Qt though? 4.7.0, 4.7.1, 4.7.2? Something older?

        Nokia Certified Qt Specialist
        Interested in hearing about Qt related work

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hsfougaris
          wrote on last edited by
          #8

          I'm sorry I missed to specify it... 4.7.2

          If you can't say what you mean, you'll never be able to mean what you say.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #9

            Hi,

            on windows using MSVS 2008 and pre build binaries, on Win7 32 bit, I can't reproduce this behavior.
            But if you look at the Qt code it is printed out, when

            @
            bool QPainter::begin(QPaintDevice *pd)
            {
            ....

            d->engine = pd->paintEngine();
            
            if (!d->engine) {
                qWarning("QPainter::begin: Paint device returned engine == 0, type: %d", pd->devType());
                return false;
            }
            
            ....
            

            @

            It could perhaps be a 64 bit issue.

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hsfougaris
              wrote on last edited by
              #10

              But my app isn't a 64 bit app...
              Thankfully whatever it misses to paint is not visible, but it's still strange...

              If you can't say what you mean, you'll never be able to mean what you say.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on last edited by
                #11

                But you are using 64 but win 7.
                Ups sorry, my system is win XP, not win 7

                Nokia Certified Qt Specialist.
                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hsfougaris
                  wrote on last edited by
                  #12

                  So I guess this needs to be verified by someone running Win7/64 bit, to see if it can be reproduced...

                  If you can't say what you mean, you'll never be able to mean what you say.

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    hsfougaris
                    wrote on last edited by
                    #13

                    can anyone running Win7/64 bit, please run the above code to see if it can be reproduce?

                    If you can't say what you mean, you'll never be able to mean what you say.

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      pinkieiknip
                      wrote on last edited by
                      #14

                      Just tried this with W7/64 on Qt 4.8.3 MinGW distribution, no messages or warnings running this code. Also tried 4.7.4 MinGW distribution, no warnings there. It shows the items properly, the checkboxes and list also behave properly.

                      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