![]() |
Re: I'm learning with Qt and I have a question
Your curly brackets aren't matching. You can easily see that in the main.cpp where you have two closing ones right after each other.
|
Re: I'm learning with Qt and I have a question
Quote:
|
Re: I'm learning with Qt and I have a question
If I remove one i get theese errors:
C:/Users/Edvinas/Documents/InteractiveHelloWorld/main.cpp:2: In file included from main.cpp:2: C:/Users/Edvinas/Documents/InteractiveHelloWorld/mainwindow.h:24: error: expected unqualified-id before '{' token C:/Users/Edvinas/Documents/InteractiveHelloWorld/main.cpp:10: error: expected '}' at end of input C:/Users/Edvinas/Documents/InteractiveHelloWorld/main.cpp:10: error: expected unqualified-id at end of input |
Re: I'm learning with Qt and I have a question
Anyone? :(
|
Re: I'm learning with Qt and I have a question
Quote:
and add them to: mainwindow.h Like someone said before: Compare and match the curly braces Code:
private: |
Re: I'm learning with Qt and I have a question
Quote:
Quote:
every opening bracket (curly, square, round) has to be closed again. check your ide's or editor's settings -- almost all should have some kind of visual markers helping you to detect those trivial and easily overlocked syntactical errors. |
Re: I'm learning with Qt and I have a question
Ok, now i get only this:
C:/Users/Edvinas/Documents/InteractiveHelloWorld/mainwindow.h:11: error: expected unqualified-id before '{' token C:/Users/Edvinas/Documents/InteractiveHelloWorld/mainwindow.h:11: error: expected unqualified-id before '{' token here's mainwindow.h: Quote:
|
Re: I'm learning with Qt and I have a question
class MainWindow : public QMainWindow;
remove the semicolon from the end of the line, you put a semicolon only when you finish a definition or statement, here the class definition isnt over. Put the semi-colon at the end of the mainwindow.h after the last curly brace marking the end of the class definition. |
Re: I'm learning with Qt and I have a question
Quote:
C:/Users/Edvinas/Documents/InteractiveHelloWorld/mainwindow.h:26: error: extra qualification 'MainWindow::' on member 'initMyWordList' |
Re: I'm learning with Qt and I have a question
do what the error says, remove the "extra qualification 'MainWindow::' " at line 26:
void MainWindow::initMyWordList(); should be void initMyWordList(); in your header you are declaring the class itself, no need for the namespace here. |
All times are GMT. The time now is 08:09. |
vBulletin® Version 3.8.8