Important: Please read the Qt Code of Conduct -

Write code of game:Dots_boxes

  • my mainwindow.h:

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    #include <QMainWindow>
    #include <QSpinBox>
    namespace Ui {
    class MainWindow;

    class MainWindow : public QMainWindow
    explicit MainWindow(QWidget *parent = 0);
    Ui::MainWindow *ui;
    QPushButton **line;

    private slots:


    #endif // MAINWINDOW_H

    my mainwindow.cpp:
    #include "mainwindow.h"
    #include "ui_mainwindow.h"

    MainWindow::MainWindow(QWidget *parent) :
    ui(new Ui::MainWindow)

    for(int t=0;t<11;t++)
    for(int  i=0;i<10;i++)
        line[i]=new QPushButton("h",this);
    for(int t=0;t<10;t++)
    for(int  i=0;i<11;i++)
        line[i]=new QPushButton("v",this);


    delete ui;

    my main.cpp:
    #include "mainwindow.h"
    #include <QApplication>

    int main(int argc, char *argv[])
    QApplication a(argc, argv);
    MainWindow w;

    return a.exec(&#41;;

    ==> we must have two player that clicke in every time on one pushbutton :if player 1->color pushbutton red:if
    player 2->color pushbutton blue.
    if four pushbutton in triangle color-->last player's clicke add one his score!
    every one that must score -->winner in game
    I want you help me and complete this code!

    [andreyc EDIT]: Added @ around the code and moved it to Jobs forum

  • Could you explain more clearer your goals?
    Do you want learn how to write code or you want somebody who write code for you and this is a job offer?

  • Lifetime Qt Champion

    Looks like a follow-up of "this":

  • i want somebody who write code for me

  • [quote author="ahmadreza" date="1399504325"]i want somebody who write code for me[/quote]

    Sure, I can do that as a job. My commercial rates are quite reasonable. When would you need it?

  • i must write it until tomorrow.

  • I am student and must write it until tomorrow

  • I guessed as much: a homework assignment. I guess that also means that you're not willing to shell out about 1000€ for it either. Anyway, I can't do it in that short a timeframe.

    As this is homework, it is intended for you to learn from. Asking somebody else to do the work for you won't teach you anything. If it needs to be done tomorrow, you better get started, and order in a load of cola/red bull/coffee to keep you awake during the night...

  • oh,1000! i work with c++ many years but i never work with Qt,ithik this project is easy for you,if it was with c++,i write this code in 2 hours!
    i try to write it,
    please say me some site for help to write this project!

  • Qt is C++, so what's your problem then? If it only takes you two hours, there's no need to worry for tomorrows deadline, is there?

    The site you need, you have already found. There is excellent documentation to be found on Qt here, as well as lots of valuable FAQ articles, blog posts, and forum topics. What else do you need?

Log in to reply