Jump to content
2time

C++ in Qt

Recommended Posts

O problema care trebuie facuta in Qt

" Write an application using Qt Creator IDE that displays tables from a SQLite database (see details below) in a GUI (Tip: use QTableView). You must use QxtLogger from QxtLib to log events in a single debug log named debug.log. Use QTabWidget to create two tabs, one for displaying table data and one for displaying the debug.log file in a QTextBrowser. In the first tab you must also display the result returned by a query (see details below) (Tip: use QSqlQuery and QSqlQueryModel). Everything must be done under Fedora OS.

The database:

name:

school.db

tables:

students(id int not null, name varchar(10), year int, primary key (id asc))

classes(id int not null, name varchar(15), class_room_number int, primary key (id asc))

class_rooms(number int not null, primary key (number asc))

time_table(class_id int, year int)

table contents example:

students:

1 | student1 | 5

2 | student2 | 5

3 | student3 | 5

4 | student4 | 2

5 | student5 | 3

classes:

1 | mathematics | 345

2 | biology | 78

4 | english | 112

class_rooms:

345

78

112

time_table:

1 | 5

3 | 2

2 | 3

Query: In what classroom do the 5th year students have to go for mathematics class?

Result must contain student names, year, classroom number, and class name.

For the given example the result should be the one below.

student1 | 5 | 345 | mathematics

student2 | 5 | 345 | mathematics

student3 | 5 | 345 | mathematics"

stie careva sau niste tutoriale in care pot invata sa fac asa ceva ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...