Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. remove

    Log in to post
    • All categories
    • jeanmilost

      Unsolved ListView - The add and remove animations remains sometimes stuck in the middle and leaves artifacts
      QML and Qt Quick • listview animations add remove stuck • • jeanmilost

      1
      0
      Votes
      1
      Posts
      459
      Views

      No one has replied

    • Mohammadsm

      Unsolved QML Settings doesn't have "remove" function !
      QML and Qt Quick • qml settings remove methods • • Mohammadsm

      9
      0
      Votes
      9
      Posts
      694
      Views

      Mohammadsm

      @J-Hilk
      I managed the required behavior, somehow.

      By blanking the key value:

      stg.setValue("step_1", "")

      then scanning the keys, which have non-empty value, and skipping the empty ones.

      I'll file a bug, cause I think it's a needed method!
      By the way, thank you all

    • L

      Unsolved How to removing QChart callout
      General and Desktop • qchart callout remove • • lshiren

      2
      1
      Votes
      2
      Posts
      251
      Views

      jsulm

      @lshiren Hi!
      It would be better to post this answer in the original thread instead of opening a new one.

    • D

      Solved Remove QGraphicsTextItem from QGraphicsScene
      General and Desktop • qgraphicsscene remove textitem qgraphicstextit • • deleted396

      7
      0
      Votes
      7
      Posts
      1705
      Views

      mrjj

      @AdrianCruz
      hi
      Super :)
      just as a note
      To avoid getting possible NULLs in the list, i would suggest doing

      QGraphicsItem *item = qgraphicsitem_cast<QGraphicsItem*>(text); if (item) list.push_back(item);
    • F

      Solved i want remove Directory
      General and Desktop • remove directory qprocess • • ForestPoem

      7
      0
      Votes
      7
      Posts
      7617
      Views

      F

      @Ratzz
      Did you use a relative path. And I've solved another way thanks

    • M

      Solved QTableManager Removing All Rows Crashes Application with Bad Access
      General and Desktop • qt5.5 qtablewidget remove removerow row • • maximo

      3
      0
      Votes
      3
      Posts
      1946
      Views

      M

      @Olivier-Ronat Thanks for checking, Olivier. Sorry to detain you to do that when I found it was my own fault. However, I learned some things and got a little better at debugging in Qt Creator.

      I found the cause. I had a signal attached to the selectionModel of each row. Here's how I found out (note, I'm a newbie). On my Mac, I got the crash report and clicked a button to see what it was. This showed a callstack. I was able to see that it was complaining about setting text() from on_SelRow, and then I recalled that I had a signal connected on rows. So, I changed my code like so:

      ui->myTable->selectionModel()->disconnect(); ui->myTable->model()->removeRows(0,ui->myTable->rowCount());

      I was then able to remove rows without a crash. I just need to remember to add the signal back to the table when I add rows again.

      P.S.

      You may also be wondering why I was intercepting a selected row. The reason was because then I could show a box above the table that showed the item detail in an easier to read format than having to scroll horizontally in the table to see all the columns. I was doing it like so:

      connect(ui->myTable->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(on_SelRow(QModelIndex,QModelIndex)));

      ...and then I had a class method like so:

      void MainWindow::on_SelRow(QModelIndex oCurrRow, QModelIndex oPrevRow) { QTableWidget *t = dynamic_cast<QTableWidget *>(QObject::sender()->parent()); int y = oCurrRow.row(); // do something with t (table) and y (row index) variables }
    • Alberto

      [Solved] QTabWidgets: I can't remove one tab
      General and Desktop • qtabwidget tabs remove • • Alberto

      6
      0
      Votes
      6
      Posts
      2122
      Views

      J

      To be precise: click the gear, choose 'Edit' en put the string [Solved] in front of the title of your post

    • QT-static-prgm

      Solved QVector remove behaviour
      General and Desktop • qvector remove • • QT-static-prgm

      3
      1
      Votes
      3
      Posts
      4492
      Views

      mrjj

      Hi

      When you insert pointers in Qvector, all it ever will delete is the pointer as it would be unsafe for it to delete the object pointed too as it is outside the vector.

      If you declare it as not pointer

      QVector<SellInfo>

      Then the SellInfo struct lives in the vector and will be deleted when QVec is.

      Deleting a SellInfo would never delete "box" as it will not call box destructor.
      (its a pointer)

      A good rule is that you bring into the world with new, should be removed with delete.

      But in Qt, many of the Wigets takes ownership of childs and you do not need to call delete on them.

    • G

      installer scripting Settings operation
      Installation and Deployment • ifw settings remove registry component • • GoranShekerov

      3
      0
      Votes
      3
      Posts
      4214
      Views

      U

      @GoranShekerov
      Tried the above code to stop and remove the windows service while uninstalling from QT installer. But did not work

      function Controller()
      {
      installer.uninstallationStarted.connect(onUninstallationStarted);
      }

      onUninstallationStarted = function()
      {
      if (installer.isUninstaller()) {
      installer.performOperation("Execute", "@TargetDir@/platform/tools/Server/testServer.exe", "stop");
      console.log("Server stopped")
      installer.performOperation("Execute", "@TargetDir@/platform/tools/Server/testServer.exe", "remove");
      console.log("Server removed")
      }
      }