Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved 2 Analog Clocks looking very similar...

    General and Desktop
    3
    4
    83
    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.
    • A
      alfware last edited by

      ... but they use different technics(?) and I found them in the Qt (13.2) examples in "gui" and in "widgets"
      I am a beginner in Qt programming and as a first try I wanted to extend the clock because it has no pointer for the seconds,
      I just planned to build :-)
      But now my problem: which source should I take as template? "Gui" or "Widget". I would say "widget" because it more looks like the other examples I have studied - but why are there 2 versions, only to confuse beginners?

      Okay. Just another important question: How to clone a project? I didnt found any "Save as" or "Copy" or even an "Rename".
      At last I resigned and did something on Windows (copy the files and rename all, in the source, project file and so on).

      I guess there is a comfortable way to do such things and backup?

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        Hi and welcome to the forums.
        The easiest way is to copy the whole project folder to somewhere else and then
        modify it.

        Im not sure where you see this GUI or Widget ?
        If its new project Dialog, its means Default GUI project versus standalone widget. ( to be used in other project)

        If you could link the example you are trying to compile ?

        If its the normal Analog clock example
        https://doc.qt.io/qt-5/qtwidgets-widgets-analogclock-example.html
        then the other version shows how to make it a true plugin to be used in Designer
        where as example one is just custom widget.

        1 Reply Last reply Reply Quote 4
        • A
          alfware last edited by

          Yes this is (are) the clock(s) I mean...
          I found them in my Qt Creator and then located at my local folder

          .../examples/qt-5.13.2./widgets/widgets/analogclock
          .../examples/qt-5.13.2.gui/analogclock

          The description say
          "The Analog Clock example shows how to draw the contents of a custom widget."
          vs
          "The Analog Clock example shows how to draw the contents of a custom window."
          (sorry I am a German and a beginner, dont see there big difference).

          But as if you also linked the .../widgets/widgets/... I guess its the right example for me.
          And once I will know what a "real plugin to be used in Designer" means.
          Both run in my PC and I only wanted to modify one a little bit (the seconds pointer).

          With "copy" I meant make a similar project with a new name (I chosen "meineuhr") same contents.
          Okay now I did it, but I really changed every single file outside the Qt (with an external editor and find-change)
          before first open it in Qt and try to modify the program.

          Therefore I missed any automatic refactor like in other IDE or even a "save as" :-)

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Hi,

            There are two examples because both uses different technologies.

            The QtGui module does not provide widgets like the QtWidgets module.

            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 Reply Quote 1
            • First post
              Last post