[Solved] How to create an matrix of QLineEdit Dynamically

  • Hello guys, I am new in the world of QT...
    I am studying its powerfull framework, so now I have this following issue.
    I have one MainWindow which has an classic menutoolbar (File >> new), when the user to click on New option in menutoolbar the new DialogWindow opens. In this new Dialog the user will type the dimensions of matrix. So, according with this dimensions I want to create an new Tab in MainWindow bellow of menutoolbar, in this tab will have an Matrix of QLineEdit. So, I would like to know if anybody could help me with this. How Can I to do this?

    Already, I thanks so much.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You should start by creating a widget that will contain and handle your QLineEdit matrix (have a look at QGridLayout).

    Have a QTabWidget as central widget of your QMainWindow.

    Also have a look at the Signals & Slots documentation which are corner stones of Qt's architecture.

    For the dialog/main window interaction, the best source is Qt's documentation and examples. You'll find there everything you need to start (Don't hesitate to take time to go through them, they are a valuable source of inspiration)

    Hope it helps

  • Hiiii, firstly sorry for my delay....
    Thanks for your answer, you helped me so much, in fact, you saved me. I did it.

  • Lifetime Qt Champion

    You're welcome !

    If everything is working now, don't forget to update the thread title prepending [solved] so other forum users may know a solution has been found :)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.