Il 16/12/2015 14:10, Duane ha scritto:
I'm subclassing a QFileDialog.  I need to get a pointer to the filename
box.  I was doing this with findChild<QLineEdit*>()  with Qt4 but with
Qt5 this returns null.  Any suggestions?

Where are you doing that findChild? A non-native QFileDialog is lazily populated. Typically you need to wait until a show event gets delivered and handled by it to be sure you'll have the widgets created.

Random notes:

1) As many others have told you, this may be symptomatic of bad design...

2) That's an API abuse, hence totally unsupported and can break again at any time.

HTH,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts

Attachment: smime.p7s
Description: Firma crittografica S/MIME

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to