Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Learning
  3. Qt in Education
  4. Suggestion to improve tutorial
Forum Updated to NodeBB v4.3 + New Features

Suggestion to improve tutorial

Scheduled Pinned Locked Moved Qt in Education
7 Posts 3 Posters 2.5k 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.
  • A Offline
    A Offline
    AlexK
    wrote on last edited by
    #1

    Hi all, when doing the (very helpful!) AddressBook-tutorial, I stumbled upon some inaccurate code in part 5... see "this StackOverflow-Post":http://stackoverflow.com/questions/23195712/memory-management-in-qt-addressbook-tutorial. Maybe it should be fixed, so there won't be the same confusion for others.

    I suggest just changing

    @AddressBook::AddressBook(QWidget *parent) : QWidget(parent)
    {
    dialog = new FindDialog;
    }@

    to

    @AddressBook::AddressBook(QWidget *parent) : QWidget(parent)
    {
    dialog = new FindDialog(this);
    }@

    this would make it clear, that the dialog is a child object of AddressBook and thus will be deleted correctly.

    The QPointer solution would be more thorough, but also a lot more confusing for beginners.

    Happy to hear your thoughts on this!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stevenceuppens
      wrote on last edited by
      #2

      Hi Alex,

      Good suggestion,

      If you like, you can contribute this change trough codereview.qt-project.org!

      Steven CEUPPENS
      Developer / Architect
      Mobile: +32 479 65 93 10

      1 Reply Last reply
      0
      • JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        Hi, and welcome to the Qt Dev Net!

        Thanks for reporting this, Alex. I've taken note of it, and will update it for the Qt 5.3.1 release (unless someone else does it first).

        If you find any other issues, please report them to https://bugreports.qt-project.org/ -- posts here usually won't be seen by devs.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        0
        • S Offline
          S Offline
          stevenceuppens
          wrote on last edited by
          #4

          Hi JKSH,

          I like to volunteer for this!

          Rgds, Steven

          Steven CEUPPENS
          Developer / Architect
          Mobile: +32 479 65 93 10

          1 Reply Last reply
          0
          • S Offline
            S Offline
            stevenceuppens
            wrote on last edited by
            #5

            https://codereview.qt-project.org/#change,83799

            Steven CEUPPENS
            Developer / Architect
            Mobile: +32 479 65 93 10

            1 Reply Last reply
            0
            • A Offline
              A Offline
              AlexK
              wrote on last edited by
              #6

              Thanks, that was fast! :)

              1 Reply Last reply
              0
              • JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #7

                @Steven: Thank you! Your patch has been approved :D

                @Alex: This is the beauty of an open-source project like Qt :) Everyone has the power to fix an issue they find.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                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