Created
August 1, 2012 16:53
-
-
Save dacresni/3228695 to your computer and use it in GitHub Desktop.
this qt code crashes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void MainWindow::on_actionAddTable_triggered() | |
{ | |
//add table | |
QTableWidget* newTable = new QTableWidget( 3, 3); | |
newTable->setHorizontalHeaderLabels(QStringList()<<"1"<<"2"<<"3"); | |
newTable->setVerticalHeaderLabels(QStringList()<<"A"<<"B"<<"C"); | |
qDebug() <<" table labled"; | |
// row mod(26) = letter | |
QWidget * thisPage = pageStack->currentWidget(); | |
QGraphicsView * thePage = dynamic_cast<QGraphicsView*>(thisPage); | |
QGraphicsScene * thisScene = thePage->scene(); | |
qDebug() << "scene aquired "; | |
QFocusFrame * tableProxy = new QFocusFrame(newTable); | |
qDebug() << "new frame"; | |
thisScene->addWidget( newTable); | |
qDebug() <<"table added"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment