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. change querymodel
Forum Update on Tuesday, May 27th 2025

change querymodel

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.2k 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.
  • R Offline
    R Offline
    Rameshguru
    wrote on 18 May 2017, 05:39 last edited by
    #1

    how to disable the querymodel?
    i execute query in model and apply ui->combobox->setmodel(query);
    now i want to disable setmodel(query), then i have add new model
    ui->combobox->setmodel(query) at during the execution time.

    J 1 Reply Last reply 18 May 2017, 06:43
    0
    • R Rameshguru
      18 May 2017, 05:39

      how to disable the querymodel?
      i execute query in model and apply ui->combobox->setmodel(query);
      now i want to disable setmodel(query), then i have add new model
      ui->combobox->setmodel(query) at during the execution time.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 18 May 2017, 06:43 last edited by
      #2

      @Rameshguru From documentation (http://doc.qt.io/qt-5/qcombobox.html#setModel):
      "If you want to clear the contents of a model, call clear()."
      So, just call clear() and then set new model.

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

      1 Reply Last reply
      1
      • R Offline
        R Offline
        Rameshguru
        wrote on 19 May 2017, 03:59 last edited by
        #3

        i call clear but not work

        J V 2 Replies Last reply 19 May 2017, 04:17
        0
        • R Rameshguru
          19 May 2017, 03:59

          i call clear but not work

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 19 May 2017, 04:17 last edited by
          #4

          @Rameshguru said in change querymodel:

          not work

          What does it mean? What does not work?

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

          1 Reply Last reply
          0
          • R Rameshguru
            19 May 2017, 03:59

            i call clear but not work

            V Offline
            V Offline
            Venkatesh V
            wrote on 24 May 2017, 03:41 last edited by
            #5

            @Rameshguru

            can you brief question clearly that what you want to achieve..

            1 Reply Last reply
            0

            1/5

            18 May 2017, 05:39

            • Login

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