Your code defines "mw" as pointer to QWidget. QWidget has no "signalRowSelected" signal, so you'll get the compilation warning. The constructor definition you posted does not contain "QWidget * parent" as an argument, but I'll assume that is due to sloppy cut-and-paste and that it is present in your real code.QWidget *mw;
Maybe only in your assumption. The only real test is to callI was assuming it was understood that EditWidget was a promoted widget in QMainWindow as assigned in QtDesigner. That means the parent of EditWidget is a QMainWindow.and verify that the pointer returned from the cast is non-NULL -at run time-. The compiler will let you write any syntactically valid code you want, but that doesn't mean it executes as you expect.Qt Code:
qobject_cast< MainWindow * >( parent )To copy to clipboard, switch view to plain text mode
Which implies that "mw" may not be pointing to the class you think it is.It is never called because the connect() never links to it.
Bookmarks