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. 2 Analog Clocks looking very similar...

2 Analog Clocks looking very similar...

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 396 Views 2 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.
  • A Offline
    A Offline
    alfware
    wrote on last edited by
    #1

    ... 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
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      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
      4
      • A Offline
        A Offline
        alfware
        wrote on last edited by
        #3

        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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved