January 21, 2011

boukhaliboukhali boukhalibouk..
Lab Rat
12 posts

HELLO GRAPHICS

 

hello.
First I apologize for my english.
I am working now with Qt ,but I am not very good in programtion,but I am learning and practicing
inorther to built a project I am hopping for.
I have built a MainWindow,with many tabWidgets my idee is to have a graphicsScene in every
tabWidget,but it’s not working I have create a QWidget for everyone,but and when I add the
widgets the graphicsScene dont work,..
the probleme is with the QWidget constructor,..
the probleme is with the addTab QTabWidegt function,..
Perhaps,so haw can I do to insert many graphicsScene with differents contents,in the MainWindow ,because I want the MenuBarre ,..
Thanks.

4 replies

January 21, 2011

Volker Volker
Robot Herder
5428 posts

In your case – completely new to Qt and not much experience in programming in general – I strongly recommend starting with some simple examples from the various tutorials and getting started documents.

Some links follow to give you a start:

Qt itself comes with a large set of examples and demo applications. You can learn much if you study these – they are provided for this purpose!

Doing things in the right order is crucial in IT and programmin world. So, the more you feel comfortable, you can extend your application and add all the desired features.

In your case:

  • Learn all the basic stuff from the tutorials mentioned before
  • Make a reduced main window work, learn how to deal with menu bars, tool bars and all that stuff
  • Then add one QGraphicsScene, make that work
  • Then add the tabs

January 21, 2011

boukhaliboukhali boukhalibouk..
Lab Rat
12 posts

Thanks .
but that’s what I am doing since sometimes,but there is not much simple examples with QGraphicsScene,and the ones here
gives few informations or complexe informations,for me…
I know that nowbody can teach me all I have to know about it
but ,I hope having a useful simple example using a QMainWindow
wich have a QTabWidget inside with tow or tree tabs displaying
a QGraphicsScene everyone…
It’s not you ,but I hope somebody,could give me I small exemple like that, if he have I time…
Thanks,for for your reply.

January 27, 2011

Volker Volker
Robot Herder
5428 posts

QGraphicsView and its associated classes are a complex beast on its own. I’d really suggest you make a simple graphics view work correctly. Adding this class to a tab widget is not that hard afterwards.

You could try the tab widget stuff with a simple widget inside (say a QTextEdit) to get comfortable with its API.

March 9, 2011

boukhaliboukhali boukhalibouk..
Lab Rat
12 posts

Thanks you
that’s wat I have done ,and declare the graphicsscene in the
graphicsview constructor it is working very good.
I have done my smalls animations, Thanks , ..
I have found what I was searching for, ..
Simple widget for me ,could’int hold Objects that properties
can be changed as a QGraphicsObject, that’s wy the
graphicsscene is needed , but with I simple code I can have what I wanted , thanks.

 
  ‹‹ QDom coloring      OpenSsl in Qt ››

You must log in to post a reply. Not a member yet? Register here!