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
Qt 6.11 is out! See what's new in the release blog

change querymodel

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.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.
  • R Offline
    R Offline
    Rameshguru
    wrote on 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.

    jsulmJ 1 Reply Last reply
    0
    • R Rameshguru

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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 last edited by
        #3

        i call clear but not work

        jsulmJ Venkatesh VV 2 Replies Last reply
        0
        • R Rameshguru

          i call clear but not work

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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

            i call clear but not work

            Venkatesh VV Offline
            Venkatesh VV Offline
            Venkatesh V
            wrote on last edited by
            #5

            @Rameshguru

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

            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