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. Basic Drawing Example getting error´s
Forum Updated to NodeBB v4.3 + New Features

Basic Drawing Example getting error´s

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.2k 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.
  • Flaming MoeF Offline
    Flaming MoeF Offline
    Flaming Moe
    wrote on last edited by
    #1

    Sorry for spaming your forum,

    i try my luck with the "Basic Drawing Example" and i get a lot of errors, some reporting acces to private elements of a class.
    I guess it´s rather something with my project settings or something similar. Are there any traps known i could habe stepped into?
    My version is Qt5.2.3 ans OS is Windows 7 home.

    nest regards,
    Moe

    A lovely day for a ̶g̶̶u̶̶i̶̶n̶̶n̶̶e̶̶s̶ DUFF^^

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      Few questions:

      • Did you install Qt using an installer?
      • What kind of Qt for Windows do you have VS or MinGW?
      • Do you use QtCreator to build a project?
      • Are you talking about "this":http://qt-project.org/doc/qt-5/qtwidgets-painting-basicdrawing-example.html example?
      • Did you modify anything in the code ?
      1 Reply Last reply
      0
      • Flaming MoeF Offline
        Flaming MoeF Offline
        Flaming Moe
        wrote on last edited by
        #3

        My qt V5.3.2, ic got it from here
        http://qt-project.org/downloads and used the istaller
        but i think the webside suggets only fitting versions, so may be the link doesn´t help.

        VS means Visiual Studio? I have just the Creator running.

        I´m using QtCreator

        Yes i meant that example

        I modified two things, but removed them in the second try:
        i need to add "Qt += core gui widgets" to the .pro file and since i´m running under windows i have to make the mainloop void.

        A lovely day for a ̶g̶̶u̶̶i̶̶n̶̶n̶̶e̶̶s̶ DUFF^^

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andreyc
          wrote on last edited by
          #4

          [quote author="Flaming Moe" date="1411018149"]My qt V5.3.2, ic got it from here http://qt-project.org/downloads and used the istaller
          but i think the webside suggets only fitting versions, so may be the link doesn´t help.
          VS means Visiual Studio? I have just the Creator running.
          I´m using QtCreator
          [/quote]
          Yes VS means Visual Studio.
          Looks like you are using Qt MinGW.

          [quote author="Flaming Moe" date="1411018149"]
          Yes i meant that example[/quote]
          The example already has a .pro file.
          Have you tried to open example and build it without any modifications?
          Did it work?

          [quote author="Flaming Moe" date="1411018149"]
          I modified two things, but removed them in the second try:
          i need to add "Qt += core gui widgets" to the .pro file and since i´m running under windows i have to make the mainloop void.
          [/quote]
          I don't quite understand it.
          Why do you need to make the mainloop void?
          What mainloop?

          Could you show you modified code and the errors that you are getting.

          1 Reply Last reply
          0
          • Flaming MoeF Offline
            Flaming MoeF Offline
            Flaming Moe
            wrote on last edited by
            #5

            Hm,

            i got it working. I copied again the content of every provided code file into the creators editor AND i made following change since i had an issue with the puzzle example as well wich was solved by this change:

            original qrc file:
            @
            <!DOCTYPE RCC><RCC version="1.0">
            <qresource>
            <file>images/brick.png</file>
            <file>images/qt-logo.png</file>
            </qresource>
            </RCC>
            @

            my qrc file
            @
            <!DOCTYPE RCC><RCC version="1.0">
            <qresource prefix="/">
            <file>images/brick.png</file>
            <file>images/qt-logo.png</file>
            </qresource>
            </RCC>
            @

            A lovely day for a ̶g̶̶u̶̶i̶̶n̶̶n̶̶e̶̶s̶ DUFF^^

            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