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. What types of C++ Qt examples would ya'll most like to see.
Qt 6.11 is out! See what's new in the release blog

What types of C++ Qt examples would ya'll most like to see.

Scheduled Pinned Locked Moved General and Desktop
14 Posts 12 Posters 4.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.
  • C Offline
    C Offline
    chuckshaw
    wrote on last edited by
    #1

    I'm working on a book targeting Qt 5, based on the types of things I've used Qt to build over the last decade. However I want to make sure that I also cover things that I might not think of that other people have had trouble doing. So please leave a comment and let me know what types of tasks you would be interested in seeing examples for.

    Thanks,
    Chuck

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

      Cool! Best of luck to you.

      (Z(:^

      1 Reply Last reply
      0
      • C Offline
        C Offline
        code_fodder
        wrote on last edited by
        #3

        It took me a long time to find the best way to create and run my threads in QT. This topic is posted all over the web, but there seem to be many answers. I think I have found the "one true" answer (I hope!), but its probably worthy of a mention here : )

        And on that note, slots and signals between threads as well : )

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MuldeR
          wrote on last edited by
          #4

          [quote author="code_fodder" date="1366356804"]It took me a long time to find the best way to create and run my threads in QT. This topic is posted all over the web, but there seem to be many answers. I think I have found the "one true" answer (I hope!), but its probably worthy of a mention here : )

          And on that note, slots and signals between threads as well : )[/quote]

          I definitely agree!

          Another thing would be creating a "shared memory" between multiple processes and realizing properly synchronized inter-process communication using that memory.

          Yet another thing: How to implement your own QAbstractItemModel or QAbstractTableModel around your application-specific data (structures) in order to get your data displayed.

          Last not least: Create a child process via QProcess, parse the process' output and "extract" real-time progress info (probably involves some Signals&Slots magic + proper use of QRegExp's)

          My OpenSource software at: http://muldersoft.com/

          Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

          Go visit the coop: http://youtu.be/Jay...

          1 Reply Last reply
          0
          • Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Not strictly coding related but a lot of people seem to struggle with deployment of Qt5 apps (especially on Windows) so that would be nice. Maybe a word about the recently released installer framework as well.

            Description of differences in ANGLE and OpenGL builds and range of OpenGL supported features in both.

            Also translations and multi lingual/character-set/encodings scenarios support in Qt, like reading and converting network streams of character data or right-to-left layouts.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goblincoding
              wrote on last edited by
              #6

              +1 to everything already said!

              http://www.goblincoding.com

              1 Reply Last reply
              0
              • C Offline
                C Offline
                chuckshaw
                wrote on last edited by
                #7

                Thanks for the comments guys. These are all very good suggestions that I will add to the list. I know that OpenGL in Qt5 has confused people and I will definitely be spending time trying to make that more clear.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  DerManu
                  wrote on last edited by
                  #8

                  The QTextEdit with its QTextDocument backend doesn't seem to quite get the attention it deserves when one tries to find information on how to properly use it. It is very powerful and flexible, but not explained in-depth, in my opinion.

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    crayon
                    wrote on last edited by
                    #9

                    Printing with Qt

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jiangcaiyang
                      wrote on last edited by
                      #10

                      Any tutorials with Qt Quick2 and QML are recommended. Because we Chinese fellow have difficulty getting start with QML.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Skh1002
                        wrote on last edited by
                        #11

                        I would certainly like to see more coverage on making applications look and behave natively on different platforms. As I found out and as you probably know well, Qt applications do not quite do that, especially on Mac.

                        I am also interested in using ORM or similar data persistence techniques in Qt applications.

                        Another interesting subject would be porting an application from a desktop platform to a mobile one.

                        Keep us posted about your progress, a good book on Qt 5 will have a lot of value and will go a long way to make Qt a popular choice.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          stereomatching
                          wrote on last edited by
                          #12

                          @chuckshaw Could you give us some simple examples of how to deploy an app which could upload onto the mac store?This is quite confuse for beginners.

                          Edit : I forgot to mention, would you consider on providing several chapters about openGL(qml part and c++ part) and Qt5 for beginners?

                          bq. Another interesting subject would be porting an application from a desktop platform to a mobile one.

                          +1, I think the examples of android and ios would help many users

                          bq. I think I have found the “one true” answer (I hope!), but its probably worthy of a mention here : )

                          Could you share it with us?Thanks

                          1 Reply Last reply
                          0
                          • C Offline
                            C Offline
                            code_fodder
                            wrote on last edited by
                            #13

                            stereomatching,

                            Sorry for my late reply, I did not seem to get a notice about your post :(

                            Though its a little off-topic for this thread, here is what I have written within my own code-base as a comment on how to set-up a thread (and objects within the thread) correctly:

                            @
                            /* QThread notes:
                            It is important to understand how QThreads work. The general procedure to using the QThreads is:

                            • Make Object to go into thread, assign no parent
                            • Make thread
                            • Move object into thead using obj->moveToThread(thread)
                            • Connect a signal to a slot in the object that will instatiate the object members (if required)
                            • Start the thread: thread->start()

                            Now once the object receives the signal to instantiate its members they will be
                            instantiated within the thread.
                            Note: if you call an object method directly from outside the thread (or from another thread)
                            which instatiates object members, then these objects will infact be created from outside the
                            thread, and you may get warnings saying things like:
                            "timers cannot be started from another thread"
                            i.e. member functions are not thread-safe.

                            // Good example:
                            MyObj myObj = new MyObj(0); // 0 = no parent
                            QThread* thread = new QThread;
                            myObj->moveToThread(thread);
                            QObject::connect(thread, SIGNAL(started()), myObj, SLOT(run()));
                            thread->start();

                            // Bad example:
                            MyObj myObj = new MyObj(0); // 0 = no parent
                            QThread* thread = new QThread;
                            myObj->moveToThread(thread);
                            thread->start();
                            myObj->run(); //BAD - anything run() instantiates will be in 'this' thread
                            */
                            @

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              Meteorhead
                              wrote on last edited by
                              #14

                              I would most certainly like to see:

                              • Some canonical workaround for issues that arise to many people (inheriting signals, which requires multiply inheriting from QObject) designing apps.
                              • Some insight into Qt's internals (using C++11 features like perfect forwarding and move semantics used 'inside' Qt (if there are any) and means of utilizing them.
                              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