No problem, I figured as much. the graphical builders are nice, but they create issues like this. Even I looked at that thinking it was "fine" for the longest time and then I'm like... wait a second.....
Zach J. Elko Ball State University Unified Technology Support Certified Hardware & Software Technician On Tue, Mar 16, 2010 at 9:37 PM, Ian Crotty <[email protected]> wrote: > Was what I saw based on a document I read. I never really thought about it > I suppose. Makes sense. Bad habits developed from someone else's bad > habits. > > Ian Crotty > UTS Hardware Technician > Ball State University > > > On Tue, Mar 16, 2010 at 9:31 PM, Zach Elko <[email protected]> wrote: > >> Hello, >> >> As I was making some changes to Sleuths, I came across some interesting >> syntax... >> >> intviewButton = new QPushButton; >> intviewButton = ui->intviewButton; >> >> nextButton = new QPushButton; >> nextButton = ui->nextButton; >> >> lastButton = new QPushButton; >> lastButton = ui->lastButton; >> >> noteButton = new QPushButton; >> noteButton = ui->noteButton; >> >> Since this UI was created with QT Creator / Designer, all of the GUI >> object stuff is done with the ui file. For example, from ui_mainwindow.h: >> >> radioButton3 = new QRadioButton(centralWidget); >> radioButton3->setObjectName(QString::fromUtf8("radioButton3")); >> radioButton3->setGeometry(QRect(930, 290, 91, 20)); >> radioButton3->setIconSize(QSize(23, 23)); >> >> As you can see, we don't (and shouldn't) be new'ing all of our GUI >> elements in the implementation class for our window, it's just a useless and >> wasteful step. >> >> I've fixed this issue in mainwindow.cpp for SleuthsScene2. If you come >> across it in any other files, please comment out all lines that look of the >> form: someGUIThing = new GuiThing; someGUIThing = ui->someGUIThing; >> >> Thanks! >> >> Zach J. Elko >> Ball State University Unified Technology Support >> Certified Hardware & Software Technician >> >> _______________________________________________ >> Mailing list: >> https://launchpad.net/~destiny<https://launchpad.net/%7Edestiny> >> Post to : [email protected] >> Unsubscribe : >> https://launchpad.net/~destiny<https://launchpad.net/%7Edestiny> >> More help : https://help.launchpad.net/ListHelp >> >> >
_______________________________________________ Mailing list: https://launchpad.net/~destiny Post to : [email protected] Unsubscribe : https://launchpad.net/~destiny More help : https://help.launchpad.net/ListHelp

