Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Game of life grid size change query

Game of life grid size change query

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 775 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aaronjlaw
    wrote on last edited by
    #1

    Hello there,

    I have created the Game Of Life and I have a 50 by 50 grid which I have set, however I need a pushButton to resize the grid to a value I have typed into the LineEdit, how is this done? I think it has something to do with textChanged and then converting the string to an int but I am unsure how to pass these values into this slot and then ultimately to replace my @grid [50][50]@ value.

    This is the general idea - Yes I know this code will not work but you get the idea.
    @void MainWindow::on_pushButton_clicked()
    {
    //ui->label->setText("Hello world");
    if(textChanged(inputNumber))
    {
    ui->lineEdit->update(grid[lineEdit][lineEdit]); //Grid is in a different function altogether of course.
    }
    @

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved