Do these two methods return the same value?
-
ui->tablewidget->currentRow(); ui->tablewidget->currentIndex().row()
They're methods on different objects, but they seem to have the same value, right?
@duncan98 yes i think so
-
ui->tablewidget->currentRow(); ui->tablewidget->currentIndex().row()
They're methods on different objects, but they seem to have the same value, right?
-
@duncan98
https://code.woboq.org/kde/qt4/src/gui/itemviews/qtablewidget.cpp.html#_ZNK12QTableWidget10currentRowEvint QTableWidget::currentRow() const { return currentIndex().row(); }
:)
-
@duncan98
Pardon? Of course Qt is "officially available as source code" (you are presumably using the open source version now), so what do you mean? -
@JonB
What is the reason why I can't see the cpp file source code when I select the source version during installation -
@JonB
What is the reason why I can't see the cpp file source code when I select the source version during installation@duncan98
I don't know, I have never downloaded Qt sources or built Qt, I just use precompiled from Linux. If you are sure you have them you could (a) have a look around in the Qt source tree to make sure they are there and (b) you probably have to tell Creator where they are located. I don't know whether it locates the sources if not built for debug, without that you probably cannot "step into" the source but you may be able to set the editor to let you go into the sources at editing time. -
-
@J-Hilk
Yes, I thought I would be able to track the source code of the class if I installed the source code component, but I don't seem to be able to, only the header file@duncan98 said in Do these two methods return the same value?:
but I don't seem to be able to, only the header file
You need to add the Qt src path to your QtCreator.
QtCreator > Tools > Options > Debugger > Source Path Mapping > Add Qt sources
And then put the path to your
Qt/<version>/src
there.