Qt Forum

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

    Log in to post
    • All categories
    • A

      Solved How to extend qml containers (Row or Column) in another file
      QML and Qt Quick • row qtquick • • alizadeh91

      4
      0
      Votes
      4
      Posts
      172
      Views

      GrecKo

      It's documented in the QML Reference : https://doc.qt.io/qt-5/qtqml-syntax-objectattributes.html#property-attributes

    • P

      Solved QTableWidget items Memory Leak Problem!
      General and Desktop • qtablewidget qabstractitemde row release memory • • Proton Phoenix

      10
      0
      Votes
      10
      Posts
      635
      Views

      KH-219Design

      Just a note about a non-Valgrind, windows-specific leak-checking method:

      https://docs.microsoft.com/en-us/visualstudio/debugger/finding-memory-leaks-using-the-crt-library?view=vs-2019

      It has been a while since I have done any extensive work on a Microsoft platform, but in my recollection crtdbg.h can do many helpful diagnostic things, although it is sometimes tricky to get all the debug build settings configured in the way that will trigger the features you seek.

    • jeanmilost

      Solved How to add a component onto the whole row of a multi-column TableView?
      QML and Qt Quick • tableview row multi-column anchoring • • jeanmilost

      5
      0
      Votes
      5
      Posts
      465
      Views

      fcarney

      @jeanmilost Because of z ordering issues between delegates you will most likely need a popup.

    • S

      Solved How to resize QListView row to index widget size
      General and Desktop • view qlistview sizehint row resize • • sm4ll-3gg

      8
      0
      Votes
      8
      Posts
      4480
      Views

      VRonin

      @sm4ll-3gg said in How to resize QListView row to index widget size:

      what I should read to better understand Model / View / Delegate programming?

      Basically everything I know comes from Advanced Qt Prgramming: Creating Great Software with C++ and Qt4

      It is normal to set new delegate for each item if I need to show heterogeneous data in list?

      No. What I would do is create a QStackedWidget with the possible combinations, use that as base and display the correct page based on the data in the index

    • L

      Unsolved Getting the rows in a qtablewidget to new lines in a textfile in qt c++
      General and Desktop • qtcreator c++ qstring row new line • • Lasith

      4
      0
      Votes
      4
      Posts
      1566
      Views

      VRonin

      While I'm here, you can use https://github.com/VSRonin/Qt-Model-Serialisation/tree/dev

      CsvModelSerialiser modelSaver; modelSaver->setModel(ui->tableWidget_2->model()); modelSaver->setCsvSeparator(" "); QFile mFile("C:/Users/Desktop/Qt/textfiles/test.txt"); modelSaver->saveModel(&mFile);
    • michalos

      Solved Automatic Row Height in QTreeView
      General and Desktop • qtreeview qstyleditemdele height row • • michalos

      2
      0
      Votes
      2
      Posts
      3439
      Views

      michalos

      Ok. I've found the answer.

      I subclass the QTreeView and override the void resizeEvent(QResizeEvent* e) as shown:

      void MyTreeView::resizeEvent(QResizeEvent *e) { if(model() != Q_NULLPTR){ model()->layoutChanged(); } QTreeView::resizeEvent(e); }

      And it did the trick.

      Had help from the Voidrealms Facebook group.

    • M

      Unsolved How to get the index of selected row in ListView?
      General and Desktop • listview listview number row • • Mathan M

      3
      0
      Votes
      3
      Posts
      6775
      Views

      p3c0

      @Mathan-M You can access the attached property named index inside the delegate of ListView.

    • Punit

      Unsolved Add new row in QTreeView (Using QFileSystemModel to populate TreeView and QSortFilterProxy model to filter folder)
      General and Desktop • qt5.6 qtreeview qfilesystemmode qsortfilterprox row • • Punit

      2
      0
      Votes
      2
      Posts
      1757
      Views

      SGaist

      Hi,

      Apply the same filter you are using for your single folder version except that this time rather than using a QString you should keep a QStringList of the folders you want to show and use that.

    • C

      Solved QTextTable reduce row height
      General and Desktop • qtexttable qtextbrowser align row • • ChajusSaib

      9
      0
      Votes
      9
      Posts
      4108
      Views

      C

      @mrjj As you said this isn't beginner stuff, have tried but can't get it to work properly so I'll leave it for now and return to it after some while. Thank you so much, really appreciate all the help!

    • F

      Unsolved i want text align of row and column in QTableWidget
      General and Desktop • qtablewidget align centor row column • • ForestPoem

      4
      0
      Votes
      4
      Posts
      3579
      Views

      F

      @Ratzz

      thank you !

    • 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 }
    • M

      Automatically highlight the first row of Qtreewidget?
      General and Desktop • c++ linux qtreewidget item row highlight • • marlenet15

      2
      0
      Votes
      2
      Posts
      1548
      Views

      SGaist

      Hi,

      You are looking for QTreeWidget::setCurrentItem

    • S

      Row selection
      General and Desktop • qabstracttablem qt5.4 c++ qtableview row selection • • sigsevg

      3
      0
      Votes
      3
      Posts
      1126
      Views

      S

      Hi, thanks for the reply. Yes, I set that flag to true but I can select a row by clicking indivual cell or horizontal header. I've overriden flags function in my model if I remove isSelectable flag i can't select anything.

      Qt::ItemFlags TableModel::flags(const QModelIndex &index) const { if(!index.isValid()) { return Qt::ItemIsEnabled; } if(index.column() == 1) { if(modelList.at(index.row()).isArray) { return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsEditable; } return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable; } return Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable; }
    • M

      TableView row height
      QML and Qt Quick • tableview height row delegate • • morte

      15
      0
      Votes
      15
      Posts
      6167
      Views

      p3c0

      @morte What do you mean by not draws ? See if you get updated height inside the Component.

    • Malek_Khlif

      qtablewidget alternating row color
      General and Desktop • qtablewidget alternating row color • • Malek_Khlif

      4
      0
      Votes
      4
      Posts
      2133
      Views

      SGaist

      Hi,

      What do you mean by "other row for all view" ?