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. QUndoCommand
Forum Updated to NodeBB v4.3 + New Features

QUndoCommand

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 478 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.
  • JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by JonB
    #1

    Purely out of interest. QUndoCommand requirements specifies qmake: QT += widgets (Qt5) or qmake: QT += gui (Qt6). Why? What does it have to do with/why does it need widgets?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      It probably just felt right at the time to put it in widgets. That class is older than QtQuick, older than QtGui module. I've checked the code, there is nothing widgets-specific there, it could easily be moved out of Widgets into Gui or even Core. I guess people just forgot about it.

      You can propose to move it (via mailing lists or Qt bugtracker), but the earliest when it can be done is Qt 7.

      (Z(:^

      JonBJ 1 Reply Last reply
      1
      • sierdzioS sierdzio

        It probably just felt right at the time to put it in widgets. That class is older than QtQuick, older than QtGui module. I've checked the code, there is nothing widgets-specific there, it could easily be moved out of Widgets into Gui or even Core. I guess people just forgot about it.

        You can propose to move it (via mailing lists or Qt bugtracker), but the earliest when it can be done is Qt 7.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @sierdzio
        Thanks for answering! I didn't mean to start a riot :) It just means that, for example, unless it's in Core it cannot be used in a QCoreApplication/non-UI program, where its functionality might still be wanted.

        FWIW I created a "suggestion" at https://bugreports.qt.io/browse/QTBUG-102602.

        1 Reply Last reply
        1
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          It's a good suggestion, I totally support it. I don't think it will be treated as "riot". A lot of classes were moved out of widgets before Qt 5, it's entirely possible this one just got missed.

          (Z(:^

          JonBJ 1 Reply Last reply
          0
          • sierdzioS sierdzio

            It's a good suggestion, I totally support it. I don't think it will be treated as "riot". A lot of classes were moved out of widgets before Qt 5, it's entirely possible this one just got missed.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @sierdzio
            I noted that at Qt6 it got moved from widgets to gui. But still requires UI. Don't know if Qt6 dropped += widgets and only has += gui.

            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