QFileDialog->getOpenFileName() errors in debugger.
-
wrote on 15 Oct 2018, 17:36 last edited by mzimmers
Hi all -
When I run the code below in the debugger:
QFileDialog *qfd; ... filename = qfd->getOpenFileName(this, tr("Open Firmware file"), pathname, filter, &selectedFilter, QFileDialog::DontUseNativeDialog);
Two odd things occur:
- I get several instances of this error message:
onecore\com\combase\catalog\packagedcomcatalog.cpp(1993)\combase.dll!75F6EAD0: (caller: 75FA2BDC) ReturnHr(6) tid(1cec) 80040155 Interface not registered
- The app needs several seconds to fully render the dialog.
Neither of these occur when running the app without the debugger.
Any ideas what I'm doing wrong? Thanks...
EDIT: the DontUseNativeDialog flag was an attempt to fix this; the behavior's the same with or without it.
-
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
QFileDialog *qfd;
Just as a note:
You do have
QFileDialog *qfd = new QFileDialog(this)
some place? -
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
QFileDialog *qfd;
Just as a note:
You do have
QFileDialog *qfd = new QFileDialog(this)
some place? -
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
80040155 Interface not registered
I have had similar message using visual studio compiler.
It went away after i repair VS using the option in the installer.
There can be other reason for this error
https://stackoverflow.com/questions/44579720/qt-widget-application-library-not-registered-error -
Hi all -
When I run the code below in the debugger:
QFileDialog *qfd; ... filename = qfd->getOpenFileName(this, tr("Open Firmware file"), pathname, filter, &selectedFilter, QFileDialog::DontUseNativeDialog);
Two odd things occur:
- I get several instances of this error message:
onecore\com\combase\catalog\packagedcomcatalog.cpp(1993)\combase.dll!75F6EAD0: (caller: 75FA2BDC) ReturnHr(6) tid(1cec) 80040155 Interface not registered
- The app needs several seconds to fully render the dialog.
Neither of these occur when running the app without the debugger.
Any ideas what I'm doing wrong? Thanks...
EDIT: the DontUseNativeDialog flag was an attempt to fix this; the behavior's the same with or without it.
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
When I run the code below in the debugger
Why are you calling a static function like an object method to begin with?
-
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
When I run the code below in the debugger
Why are you calling a static function like an object method to begin with?
wrote on 15 Oct 2018, 18:20 last edited by@kshegunov said in QFileDialog->getOpenFileName() errors in debugger.:
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
When I run the code below in the debugger
Why are you calling a static function like an object method to begin with?
I'm not sure I understand your question; what should I be doing differently?
-
@kshegunov said in QFileDialog->getOpenFileName() errors in debugger.:
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
When I run the code below in the debugger
Why are you calling a static function like an object method to begin with?
I'm not sure I understand your question; what should I be doing differently?
@mzimmers
Hi, the function is static, meaning it call be called WITHOUT an object instance ( qfd in this case )
notice the syntax in sample.
-
@kshegunov said in QFileDialog->getOpenFileName() errors in debugger.:
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
When I run the code below in the debugger
Why are you calling a static function like an object method to begin with?
I'm not sure I understand your question; what should I be doing differently?
Well, the thing is that
qfd
has no meaning in your case.QFileDialog::getOpenFileName
is a static function, thus it neither requires nor it takes into account any object of typeQFileDialog
. What you ordinarily do is just call it as a regular function:QString filename = QFileDialog::getOpenFileName( .... )
PS.
<rant>
I has annoyed me for ages that in the Qt docs you see the following application skeleton:int main(int argc, char *argv[]) { QApplication app(argc, argv); return app.exec(); }
It is misleading!
QCoreApplication::exec
is a static function!
</rant> -
wrote on 15 Oct 2018, 18:28 last edited by
OK, thanks for the explanation. I changed it per your example -- behavior is unchanged.
-
I imagine so, it's just an oddity. The point was you understand that whatever you do to the object has no bearing on the
QFileDialog::getOpenFileName
.My first advice would've been to try the Qt dialog, but apparently that's not the problem. Second thing that comes to mind is to try the regular way of opening the dialog, i.e. using
show
on an initialized object. Third thing you could try is to disable the side pane of the dialog (I'm too lazy to check the docs for the correct flag, but I'm sure you can manage that). -
@mzimmers
Just to know.
Which compiler are you using ? -
@mzimmers
ok, just the one that comes with Qt ?
Could you try a clean default GUI project and just a pushbutton with
QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
"/home",
tr("Images (*.png *.xpm *.jpg)"));
to see if it always says it or it somehow is related to your code ? -
@mzimmers
ok, just the one that comes with Qt ?
Could you try a clean default GUI project and just a pushbutton with
QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
"/home",
tr("Images (*.png *.xpm *.jpg)"));
to see if it always says it or it somehow is related to your code ?wrote on 15 Oct 2018, 20:39 last edited byGot this:
onecoreuap\shell\windows.storage\sharedstoragesources\util.cpp(2831)\windows.storage.dll!764FCA21: (caller: 7655AA74) ReturnHr(1) tid(2fc8) 80070490 Element not found. CallContext:[\CAutoDestItemsEnum::Next\CAutoDestItemsEnum::_EnsureInit] onecoreuap\shell\windows.storage\homefolder.cpp(504)\windows.storage.dll!768C5FE8: (caller: 76603224) ReturnHr(2) tid(2fc8) 80004002 No such interface supported onecoreuap\shell\windows.storage\kfapi\folderpathidlistcache.cpp(208)\windows.storage.dll!764809CC: (caller: 7647FC1C) LogHr(1) tid(2198) 80070002 The system cannot find the file specified.
The LogHr message repeated 64 times.
-
Got this:
onecoreuap\shell\windows.storage\sharedstoragesources\util.cpp(2831)\windows.storage.dll!764FCA21: (caller: 7655AA74) ReturnHr(1) tid(2fc8) 80070490 Element not found. CallContext:[\CAutoDestItemsEnum::Next\CAutoDestItemsEnum::_EnsureInit] onecoreuap\shell\windows.storage\homefolder.cpp(504)\windows.storage.dll!768C5FE8: (caller: 76603224) ReturnHr(2) tid(2fc8) 80004002 No such interface supported onecoreuap\shell\windows.storage\kfapi\folderpathidlistcache.cpp(208)\windows.storage.dll!764809CC: (caller: 7647FC1C) LogHr(1) tid(2198) 80070002 The system cannot find the file specified.
The LogHr message repeated 64 times.
How did you install Qt?
Look also at QTBUG-67711 and QTBUG-63789. Probably what you're hitting.
-
How did you install Qt?
Look also at QTBUG-67711 and QTBUG-63789. Probably what you're hitting.
wrote on 15 Oct 2018, 21:03 last edited by@kshegunov: very interesting. I probably installed Qt via the maintenance tool, though I'm not 100% sure. I don't mind removing and re-installing, but would you suggest using the maintenance tool, or just downloading from the web site?
-
@kshegunov: very interesting. I probably installed Qt via the maintenance tool, though I'm not 100% sure. I don't mind removing and re-installing, but would you suggest using the maintenance tool, or just downloading from the web site?
Actually I would've suggested trying building the library yourself. I'm not sure if you're going to get enough bang for the buck though, even if it helps at all; building Qt on windows is somewhat finicky ...
-
wrote on 15 Oct 2018, 21:27 last edited by
Yeah, I think I'll just live with it until it gets shaken out. My primary concern was that I was doing something wrong; if it's a library mismatch, I can ignore the symptoms, especially since they don't occur outside of the debugger.
Thanks, all.
-
I imagine so, it's just an oddity. The point was you understand that whatever you do to the object has no bearing on the
QFileDialog::getOpenFileName
.My first advice would've been to try the Qt dialog, but apparently that's not the problem. Second thing that comes to mind is to try the regular way of opening the dialog, i.e. using
show
on an initialized object. Third thing you could try is to disable the side pane of the dialog (I'm too lazy to check the docs for the correct flag, but I'm sure you can manage that).wrote on 22 Oct 2018, 14:25 last edited by@kshegunov said in QFileDialog->getOpenFileName() errors in debugger.:
Second thing that comes to mind is to try the regular way of opening the dialog, i.e. using
show
on an initialized object.What did you mean by this? I'm ready to try something new.
-
@kshegunov said in QFileDialog->getOpenFileName() errors in debugger.:
Second thing that comes to mind is to try the regular way of opening the dialog, i.e. using
show
on an initialized object.What did you mean by this? I'm ready to try something new.
@mzimmers said in QFileDialog->getOpenFileName() errors in debugger.:
What did you mean by this? I'm ready to try something new.
QFileDialog * dialog = new QFileDialog(this); dialog->setNameFilters(...); // ... more ... dialog->show();
1/20