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. General questions about Model in Qt (docs)
Forum Updated to NodeBB v4.3 + New Features

General questions about Model in Qt (docs)

Scheduled Pinned Locked Moved Solved General and Desktop
19 Posts 5 Posters 1.3k 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.
  • X Offline
    X Offline
    Xilit
    wrote on last edited by SGaist
    #1

    Hi guys and girls! I start learning model concept in Qt (MVD pattern). And reading documantations I'd like to clearify some question. So.

    1. In Qt's docs says "The QAbstractItemModel class provides the abstract interface for item model classes". But what does really means "item model classes"? And why QAbstractListModel and QAbstractTableModel are not "item model classes"?

    2. In Qt's docs about QAbstractItemModel: "Every item of data that can be accessed via a model has an associated model index". What is this item? I have picture from doc.

    This is the picture.

    PS Sorry for posting picture like that but I did't find how to hide it under spoiler.

    [edit: Fixed image link, SGaist]

    sierdzioS 1 Reply Last reply
    0
    • X Xilit

      Hi guys and girls! I start learning model concept in Qt (MVD pattern). And reading documantations I'd like to clearify some question. So.

      1. In Qt's docs says "The QAbstractItemModel class provides the abstract interface for item model classes". But what does really means "item model classes"? And why QAbstractListModel and QAbstractTableModel are not "item model classes"?

      2. In Qt's docs about QAbstractItemModel: "Every item of data that can be accessed via a model has an associated model index". What is this item? I have picture from doc.

      This is the picture.

      PS Sorry for posting picture like that but I did't find how to hide it under spoiler.

      [edit: Fixed image link, SGaist]

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @Xilit said in General questions about Model in Qt (docs):

      Hi guys and girls! I start learning model concept in Qt (MVD pattern). And reading documantations I'd like to clearify some question. So.

      1. In Qt's docs says "The QAbstractItemModel class provides the abstract interface for item model classes". But what does really means "item model classes"?

      It means a concrete class implementing the abstract model. Qt leaves the implementation to the user - this way you can use all kinds of data sources, like:

      • QStringList
      • custom object trees
      • custom lists
      • SQL databases
      • JSON, CBOR, XML
      • etc.

      And why QAbstractListModel and QAbstractTableModel are not "item model classes"?

      They are.

      1. In Qt's docs about QAbstractItemModel: "Every item of data that can be accessed via a model has an associated model index". What is this item? I have picture from doc.

      This is the picture.

      Item is on the left.

      PS Sorry for posting picture like that but I did't find how to hide it under spoiler.

      (Z(:^

      X 1 Reply Last reply
      3
      • sierdzioS sierdzio

        @Xilit said in General questions about Model in Qt (docs):

        Hi guys and girls! I start learning model concept in Qt (MVD pattern). And reading documantations I'd like to clearify some question. So.

        1. In Qt's docs says "The QAbstractItemModel class provides the abstract interface for item model classes". But what does really means "item model classes"?

        It means a concrete class implementing the abstract model. Qt leaves the implementation to the user - this way you can use all kinds of data sources, like:

        • QStringList
        • custom object trees
        • custom lists
        • SQL databases
        • JSON, CBOR, XML
        • etc.

        And why QAbstractListModel and QAbstractTableModel are not "item model classes"?

        They are.

        1. In Qt's docs about QAbstractItemModel: "Every item of data that can be accessed via a model has an associated model index". What is this item? I have picture from doc.

        This is the picture.

        Item is on the left.

        PS Sorry for posting picture like that but I did't find how to hide it under spoiler.

        X Offline
        X Offline
        Xilit
        wrote on last edited by Xilit
        #3

        @sierdzio

        Thank you! Just to be sure I understood all correctly.)

        1. "Item model classes" it's all classes that are inherited from QAbstractItemModel include your own (another words implement QAbstractItemModel).
        2. If QAbstractListModel and QAbstractTableModel are "item model classes" they are also inherited from QAbstractItemModel, right? Thise classes just "special case" of QAbstractListModel if I can say so. Just for user convinience, like temlates.
        3. So Pic1 is "Item" and Pic2 is "Model" which consists from bunch of "Items"?
        4. (Z(:^ Didn't understand what does it means. :)))
        sierdzioS 1 Reply Last reply
        0
        • X Xilit

          @sierdzio

          Thank you! Just to be sure I understood all correctly.)

          1. "Item model classes" it's all classes that are inherited from QAbstractItemModel include your own (another words implement QAbstractItemModel).
          2. If QAbstractListModel and QAbstractTableModel are "item model classes" they are also inherited from QAbstractItemModel, right? Thise classes just "special case" of QAbstractListModel if I can say so. Just for user convinience, like temlates.
          3. So Pic1 is "Item" and Pic2 is "Model" which consists from bunch of "Items"?
          4. (Z(:^ Didn't understand what does it means. :)))
          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @Xilit said in General questions about Model in Qt (docs):

          @sierdzio

          Thank you! Just to be sure I understood all correctly.)

          1. "Item model classes" it's all classes that are inherited from QAbstractItemModel include your own (another words implement QAbstractItemModel).

          I guess so. I have not written the docs ;-) My recommendation: try to write your own simple subclass QAbstractItemModel, based on QStringList data. Seeing how it works in practice will give you 100x more understanding without getting stuck at terminology.

          1. If QAbstractListModel and QAbstractTableModel are "item model classes" they are also inherited from QAbstractItemModel, right? Thise classes just "special case" of QAbstractListModel if I can say so. Just for user convinience, like temlates.

          Yes. You can check this in the documentation (at top of every class documentation there is a "inherts" section which states what give class inherits. Or, in Qt Creator, you can hit F2 when hovering over class name, to go to the header file, then you can see what it inherits from, too.

          1. So Pic1 is "Item" and Pic2 is "Model" which consists from bunch of "Items"?

          You could say that, yes. Model is an abstract concept, it can have many definitions/ representations.

          Item is a single piece of data, like one leaf of a tree, one cell in a table, one row in a list, one pixel on a screen etc. Model data is the whole tree, table, list, screen. The model (class in Qt) is a general access point to the data.

          So all classes using the model (QTreeView, ListView in QML, and many many more) are asking the model for data, descriptions, asking the model to modify the data etc. These "higher" view classes do not know anything about the data - they don't know if it is a list, if it is taken from database or text file, nothing. All the info they have is what model class gives them.

          That's why all models have to be based on QAbstractItemModel (directly or indirectly - you can subclass QAbstractTableModel if it fits your use case better), to have one common set of methods and access points.

          1. (Z(:^ Didn't understand what does it means. :)))

          It's my signature. An emoticon of Napoleon. Because why not :P

          (Z(:^

          X 1 Reply Last reply
          4
          • sierdzioS sierdzio

            @Xilit said in General questions about Model in Qt (docs):

            @sierdzio

            Thank you! Just to be sure I understood all correctly.)

            1. "Item model classes" it's all classes that are inherited from QAbstractItemModel include your own (another words implement QAbstractItemModel).

            I guess so. I have not written the docs ;-) My recommendation: try to write your own simple subclass QAbstractItemModel, based on QStringList data. Seeing how it works in practice will give you 100x more understanding without getting stuck at terminology.

            1. If QAbstractListModel and QAbstractTableModel are "item model classes" they are also inherited from QAbstractItemModel, right? Thise classes just "special case" of QAbstractListModel if I can say so. Just for user convinience, like temlates.

            Yes. You can check this in the documentation (at top of every class documentation there is a "inherts" section which states what give class inherits. Or, in Qt Creator, you can hit F2 when hovering over class name, to go to the header file, then you can see what it inherits from, too.

            1. So Pic1 is "Item" and Pic2 is "Model" which consists from bunch of "Items"?

            You could say that, yes. Model is an abstract concept, it can have many definitions/ representations.

            Item is a single piece of data, like one leaf of a tree, one cell in a table, one row in a list, one pixel on a screen etc. Model data is the whole tree, table, list, screen. The model (class in Qt) is a general access point to the data.

            So all classes using the model (QTreeView, ListView in QML, and many many more) are asking the model for data, descriptions, asking the model to modify the data etc. These "higher" view classes do not know anything about the data - they don't know if it is a list, if it is taken from database or text file, nothing. All the info they have is what model class gives them.

            That's why all models have to be based on QAbstractItemModel (directly or indirectly - you can subclass QAbstractTableModel if it fits your use case better), to have one common set of methods and access points.

            1. (Z(:^ Didn't understand what does it means. :)))

            It's my signature. An emoticon of Napoleon. Because why not :P

            X Offline
            X Offline
            Xilit
            wrote on last edited by
            #5

            @sierdzio

            Wow! Thank you so much!

            "I have not written the docs ;-)" That's a pity! I wish you have. Your style of explanation is more understandable than docs have. Maybe Qt team should hire you.:)))

            "It's my signature. An emoticon of Napoleon. Because why not :P"

            Sorry, I thought it was written to my. I didn't notice that it was your signature. XD

            Thank you my friend to help me out with docs!

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

              Thanks, that's nice to hear. I always think my explanations are too complex :D

              Happy coding!

              (Z(:^

              1 Reply Last reply
              1
              • X Offline
                X Offline
                Xilit
                wrote on last edited by Xilit
                #7

                I have another bunch of questions. I don't want to start new topic of newbiesh questions so I decided to continue write here.

                1. DOCS:
                  "Model indexes contain a pointer to the model that created them, and this prevents confusion when working with more than one model".
                QAbstractItemModel *model = index.model();
                

                What does .model() means? It must be a member of QAbstractItemModel class but I can't find such memeber in QAbstractItemModel class. Maybe it should be

                QAbstractItemModel *model = model.index();
                

                But there is no member index() with no parameters. Also I can't see Model indexes in this example.

                1. Another question.

                I always thought that in C++ pure virtual function is obligatory for implementation in child classes. To illustrate that I've created class A with

                virtual void myFunction() = 0;
                

                and class B : public A (class B inherits class A). So class A is abstract (you can't create object of such class). Class B is not abstract so I can create object of class B... BUT! Only if I implement virtual function

                virtual void myFunction() = 0;
                

                in class B first. Maybe not implement, but just write like that:

                void myFunction() override {};
                

                Even without implementation. Only after that I can create object of class B. So implementation of virtual function is obligatory for child classes.

                But when I made subclass from QAbstractItemModel with 5 virtual functions ( index(), parent(), rowCount(), columnCount(), and data() ) my project was build even when I commented index(), rowCount(), columnCount() which are virtual. Why if I must implement all virtual functions?

                1. If I press F2 to name of class (for example QStringListModel) I go to header file. But where is cpp-files to see the impementation of it?

                2. Also I'd like to find out what is Qt-class is? I mean Qt::green or Qt::TextFormat? When you type Qt:: you have huge list of autocomplite. Is this superglobal class?

                JonBJ sierdzioS 2 Replies Last reply
                0
                • X Xilit

                  I have another bunch of questions. I don't want to start new topic of newbiesh questions so I decided to continue write here.

                  1. DOCS:
                    "Model indexes contain a pointer to the model that created them, and this prevents confusion when working with more than one model".
                  QAbstractItemModel *model = index.model();
                  

                  What does .model() means? It must be a member of QAbstractItemModel class but I can't find such memeber in QAbstractItemModel class. Maybe it should be

                  QAbstractItemModel *model = model.index();
                  

                  But there is no member index() with no parameters. Also I can't see Model indexes in this example.

                  1. Another question.

                  I always thought that in C++ pure virtual function is obligatory for implementation in child classes. To illustrate that I've created class A with

                  virtual void myFunction() = 0;
                  

                  and class B : public A (class B inherits class A). So class A is abstract (you can't create object of such class). Class B is not abstract so I can create object of class B... BUT! Only if I implement virtual function

                  virtual void myFunction() = 0;
                  

                  in class B first. Maybe not implement, but just write like that:

                  void myFunction() override {};
                  

                  Even without implementation. Only after that I can create object of class B. So implementation of virtual function is obligatory for child classes.

                  But when I made subclass from QAbstractItemModel with 5 virtual functions ( index(), parent(), rowCount(), columnCount(), and data() ) my project was build even when I commented index(), rowCount(), columnCount() which are virtual. Why if I must implement all virtual functions?

                  1. If I press F2 to name of class (for example QStringListModel) I go to header file. But where is cpp-files to see the impementation of it?

                  2. Also I'd like to find out what is Qt-class is? I mean Qt::green or Qt::TextFormat? When you type Qt:: you have huge list of autocomplite. Is this superglobal class?

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

                  @Xilit
                  model() is not a member of QAbstractItemModel, it is an instance of it.. QModelIndex::model() (which is a member of the QModelIndex class) returns the model the index belongs to. It should not be what you said it should be :) With few/rare exceptions, you can rely on the Qt doc pages being correct!

                  Yes to everything you said about pure virtual (but not just virtual without pure, I think you know that.) So far as I can see they do need implementing in a sub-class, so if you truly derived from QAbstractItemModel you would need to implement. There are queries on the web showing others receiving compiler/linker errors when they fail to do so. I think you'd have to show your code. Thinking aloud, did you instantiate your sub-class? Without that I think it would remain pure virtual itself. As per QAbstractModel class, it does not prevent compiling/linking, but you can't instantiate from it.

                  X 1 Reply Last reply
                  1
                  • JonBJ JonB

                    @Xilit
                    model() is not a member of QAbstractItemModel, it is an instance of it.. QModelIndex::model() (which is a member of the QModelIndex class) returns the model the index belongs to. It should not be what you said it should be :) With few/rare exceptions, you can rely on the Qt doc pages being correct!

                    Yes to everything you said about pure virtual (but not just virtual without pure, I think you know that.) So far as I can see they do need implementing in a sub-class, so if you truly derived from QAbstractItemModel you would need to implement. There are queries on the web showing others receiving compiler/linker errors when they fail to do so. I think you'd have to show your code. Thinking aloud, did you instantiate your sub-class? Without that I think it would remain pure virtual itself. As per QAbstractModel class, it does not prevent compiling/linking, but you can't instantiate from it.

                    X Offline
                    X Offline
                    Xilit
                    wrote on last edited by
                    #9

                    @JonB

                    Thank you!

                    Thinking aloud, did you instantiate your sub-class? Without that I think it would remain pure virtual itself.

                    I know that was very silly but I didn't create any object of this class.:( When I created it I've got error that I need implement some methods. I didn’t think that I would wait for this error so much.:D

                    Maybe someone can help me with 3-4 questions? Thank you!

                    1 Reply Last reply
                    1
                    • X Xilit

                      I have another bunch of questions. I don't want to start new topic of newbiesh questions so I decided to continue write here.

                      1. DOCS:
                        "Model indexes contain a pointer to the model that created them, and this prevents confusion when working with more than one model".
                      QAbstractItemModel *model = index.model();
                      

                      What does .model() means? It must be a member of QAbstractItemModel class but I can't find such memeber in QAbstractItemModel class. Maybe it should be

                      QAbstractItemModel *model = model.index();
                      

                      But there is no member index() with no parameters. Also I can't see Model indexes in this example.

                      1. Another question.

                      I always thought that in C++ pure virtual function is obligatory for implementation in child classes. To illustrate that I've created class A with

                      virtual void myFunction() = 0;
                      

                      and class B : public A (class B inherits class A). So class A is abstract (you can't create object of such class). Class B is not abstract so I can create object of class B... BUT! Only if I implement virtual function

                      virtual void myFunction() = 0;
                      

                      in class B first. Maybe not implement, but just write like that:

                      void myFunction() override {};
                      

                      Even without implementation. Only after that I can create object of class B. So implementation of virtual function is obligatory for child classes.

                      But when I made subclass from QAbstractItemModel with 5 virtual functions ( index(), parent(), rowCount(), columnCount(), and data() ) my project was build even when I commented index(), rowCount(), columnCount() which are virtual. Why if I must implement all virtual functions?

                      1. If I press F2 to name of class (for example QStringListModel) I go to header file. But where is cpp-files to see the impementation of it?

                      2. Also I'd like to find out what is Qt-class is? I mean Qt::green or Qt::TextFormat? When you type Qt:: you have huge list of autocomplite. Is this superglobal class?

                      sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #10

                      @Xilit said in General questions about Model in Qt (docs):

                      1. If I press F2 to name of class (for example QStringListModel) I go to header file. But where is cpp-files to see the impementation of it?

                      If you checked "Sources" during installation of Qt (in Qt installer) you should be able to go to the .cpp file after pressing F4.

                      But if you don't have Qt sources, then there is actually no .cpp file so Qt Creator cannot show it.

                      You can always look the file up, for example in Woboq code browser or by downloading Qt source code manually.

                      1. Also I'd like to find out what is Qt-class is? I mean Qt::green or Qt::TextFormat? When you type Qt:: you have huge list of autocomplite. Is this superglobal class?

                      It's a namespace. See the docs.

                      (Z(:^

                      X 1 Reply Last reply
                      3
                      • sierdzioS sierdzio

                        @Xilit said in General questions about Model in Qt (docs):

                        1. If I press F2 to name of class (for example QStringListModel) I go to header file. But where is cpp-files to see the impementation of it?

                        If you checked "Sources" during installation of Qt (in Qt installer) you should be able to go to the .cpp file after pressing F4.

                        But if you don't have Qt sources, then there is actually no .cpp file so Qt Creator cannot show it.

                        You can always look the file up, for example in Woboq code browser or by downloading Qt source code manually.

                        1. Also I'd like to find out what is Qt-class is? I mean Qt::green or Qt::TextFormat? When you type Qt:: you have huge list of autocomplite. Is this superglobal class?

                        It's a namespace. See the docs.

                        X Offline
                        X Offline
                        Xilit
                        wrote on last edited by
                        #11

                        @sierdzio

                        Thank you!

                        That's strange. I've checked "Sources" during installation of Qt but after pressing F4 nothing happend. For exmple I created in my project QAbstractItemModel *model;, put cursor on QAbstractItemModel and press F2 --> go to header (qabstractitemmodel.h). And after pressing F4 nothing happened. Did I made something wrong?

                        "It's a namespace. See the docs."

                        Got it. Thank you!

                        sierdzioS J.HilkJ 2 Replies Last reply
                        0
                        • X Xilit

                          @sierdzio

                          Thank you!

                          That's strange. I've checked "Sources" during installation of Qt but after pressing F4 nothing happend. For exmple I created in my project QAbstractItemModel *model;, put cursor on QAbstractItemModel and press F2 --> go to header (qabstractitemmodel.h). And after pressing F4 nothing happened. Did I made something wrong?

                          "It's a namespace. See the docs."

                          Got it. Thank you!

                          sierdzioS Offline
                          sierdzioS Offline
                          sierdzio
                          Moderators
                          wrote on last edited by
                          #12

                          @Xilit said in General questions about Model in Qt (docs):

                          @sierdzio

                          Thank you!

                          That's strange. I've checked "Sources" during installation of Qt but after pressing F4 nothing happend. For exmple I created in my project QAbstractItemModel *model;, put cursor on QAbstractItemModel and press F2 --> go to header (qabstractitemmodel.h). And after pressing F4 nothing happened. Did I made something wrong?

                          Perhaps it does not work nowadays. Last time I tried this was a long time ago.

                          "It's a namespace. See the docs."

                          Got it. Thank you!

                          (Z(:^

                          X 1 Reply Last reply
                          1
                          • sierdzioS sierdzio

                            @Xilit said in General questions about Model in Qt (docs):

                            @sierdzio

                            Thank you!

                            That's strange. I've checked "Sources" during installation of Qt but after pressing F4 nothing happend. For exmple I created in my project QAbstractItemModel *model;, put cursor on QAbstractItemModel and press F2 --> go to header (qabstractitemmodel.h). And after pressing F4 nothing happened. Did I made something wrong?

                            Perhaps it does not work nowadays. Last time I tried this was a long time ago.

                            "It's a namespace. See the docs."

                            Got it. Thank you!

                            X Offline
                            X Offline
                            Xilit
                            wrote on last edited by
                            #13

                            @sierdzio

                            Found it in Woboq code browser. According it this file should be in qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp. Thank you for this site.)

                            I just want to see how rowCount or colomnCount were implemented.

                            Is this link correct?

                            1 Reply Last reply
                            0
                            • X Xilit

                              @sierdzio

                              Thank you!

                              That's strange. I've checked "Sources" during installation of Qt but after pressing F4 nothing happend. For exmple I created in my project QAbstractItemModel *model;, put cursor on QAbstractItemModel and press F2 --> go to header (qabstractitemmodel.h). And after pressing F4 nothing happened. Did I made something wrong?

                              "It's a namespace. See the docs."

                              Got it. Thank you!

                              J.HilkJ Offline
                              J.HilkJ Offline
                              J.Hilk
                              Moderators
                              wrote on last edited by
                              #14

                              @Xilit said in General questions about Model in Qt (docs):

                              That's strange. I've checked "Sources" during installation of Qt but after pressing F4 nothing happend. For exmple I created in my projectQAbstractItemModel *model;, put cursor on QAbstractItemModel and press F2 --> go to header (qabstractitemmodel.h). And after pressing F4 nothing happened. Did I made something wrong?

                              I'm pretty sure, you have to add the path manually in the settings of QtCreator.
                              Settings -> Debugger -> General -> Add QtSources


                              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                              Q: What's that?
                              A: It's blue light.
                              Q: What does it do?
                              A: It turns blue.

                              X 1 Reply Last reply
                              2
                              • J.HilkJ J.Hilk

                                @Xilit said in General questions about Model in Qt (docs):

                                That's strange. I've checked "Sources" during installation of Qt but after pressing F4 nothing happend. For exmple I created in my projectQAbstractItemModel *model;, put cursor on QAbstractItemModel and press F2 --> go to header (qabstractitemmodel.h). And after pressing F4 nothing happened. Did I made something wrong?

                                I'm pretty sure, you have to add the path manually in the settings of QtCreator.
                                Settings -> Debugger -> General -> Add QtSources

                                X Offline
                                X Offline
                                Xilit
                                wrote on last edited by
                                #15

                                @J-Hilk

                                Thank you!

                                If I correctly inderstand you meant this?

                                1.jpg

                                J.HilkJ 1 Reply Last reply
                                0
                                • X Xilit

                                  @J-Hilk

                                  Thank you!

                                  If I correctly inderstand you meant this?

                                  1.jpg

                                  J.HilkJ Offline
                                  J.HilkJ Offline
                                  J.Hilk
                                  Moderators
                                  wrote on last edited by
                                  #16

                                  @Xilit More or less, on the right side you can click on Add Qt sources that opens a QFileDialog, where you select the QtSource folder you downloaded.
                                  After accepting, QtC should set up everything on its own!


                                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                  Q: What's that?
                                  A: It's blue light.
                                  Q: What does it do?
                                  A: It turns blue.

                                  X 1 Reply Last reply
                                  1
                                  • J.HilkJ J.Hilk

                                    @Xilit More or less, on the right side you can click on Add Qt sources that opens a QFileDialog, where you select the QtSource folder you downloaded.
                                    After accepting, QtC should set up everything on its own!

                                    X Offline
                                    X Offline
                                    Xilit
                                    wrote on last edited by
                                    #17

                                    @J-Hilk

                                    Still don't work.( But as I've mentioned above I've already found in Woboq code browser. On this link).

                                    Interesting. I download Sources to make MySQL work, but it doesn't. Maybe that's why? Because Sqlite does. But I'm not sure what does Target path means.

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • X Xilit

                                      @J-Hilk

                                      Still don't work.( But as I've mentioned above I've already found in Woboq code browser. On this link).

                                      Interesting. I download Sources to make MySQL work, but it doesn't. Maybe that's why? Because Sqlite does. But I'm not sure what does Target path means.

                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      @Xilit Did you use "Add Qt sources..." button to add Qt sources?

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      X 1 Reply Last reply
                                      1
                                      • jsulmJ jsulm

                                        @Xilit Did you use "Add Qt sources..." button to add Qt sources?

                                        X Offline
                                        X Offline
                                        Xilit
                                        wrote on last edited by
                                        #19

                                        @jsulm

                                        Yes, I did. I think I pressed just Add instead of Add Qt sources. Now it's look like:

                                        1.jpg

                                        But when I press F4 in header file (qabstractitemmodel.h) nothing happens. It still don't want to show me cpp file.

                                        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