[Qt-interest] Dialog always opens, why?
Martin Langridge
martinl at vetsystems.com
Wed Feb 25 19:11:00 CET 2009
Remove the ; from
if(!inputFile.open(QIODevice::ReadOnly));
Knapp wrote:
> All I wanted was to test for error and if there was an error pop up a
> message box. This pops up the box every time. The ! does not make any
> difference.
>
> QFile inputFile;
> inputFile.setFileName("Thrust.txt");
> if(!inputFile.open(QIODevice::ReadOnly));
> {
> QLabel *label = new QLabel("File Error");
> label->show();
> //delete label;
> }
>
>
More information about the Qt-interest-old
mailing list