From: cerr on 3 Jun 2010 14:01 Hi There, I honestly doubt that I'm in the right group here for this question but i couldn't find another more appropriate group - if some one could direct me. I got a little UI going with a QTabWidget on it. On the bottom I have two buttons, "<< perevious" and "next>>" with which i wanna let the user "scroll" through the tabs. Now i got problems on how to modify the currentIndex property of the tab widget that selects which tab is currenly being displayed. I've tried following: void HelloForm::NextTab(void){ if (widget.tabWidget->currentIndex()!=-1) { widget.tabWidget->currentIndex(TabIndex=+1); } } But I'm getting: "HelloForm.cpp:62: error: no matching function for call to QTabWidget::currentIndex(int&) /usr/include/qt4/QtGui/qtabwidget.h:106: note: candidates are: int QTabWidget::currentIndex() const" Any help would be appreciated! Thank you! roN
From: cerr on 3 Jun 2010 14:12 On Jun 3, 11:01 am, cerr <ron.egg...(a)gmail.com> wrote: > Hi There, > > I honestly doubt that I'm in the right group here for this question > but i couldn't find another more appropriate group - if some one could > direct me. > > I got a little UI going with a QTabWidget on it. On the bottom I have > two buttons, "<< perevious" and "next>>" with which i wanna let the > user "scroll" through the tabs. Now i got problems on how to modify > the currentIndex property of the tab widget that selects which tab is > currenly being displayed. > I've tried following: > void HelloForm::NextTab(void){ > if (widget.tabWidget->currentIndex()!=-1) > { > widget.tabWidget->currentIndex(TabIndex=+1); > }} > > But I'm getting: "HelloForm.cpp:62: error: no matching function for > call to QTabWidget::currentIndex(int&) > /usr/include/qt4/QtGui/qtabwidget.h:106: note: candidates are: int > QTabWidget::currentIndex() const" > > Any help would be appreciated! > > Thank you! > roN Okay, got this going by using setCurrentIndex() instead but now i'm getting something like "IBusInputContext::createInputContext: no connection to ibus-daemon" - that i don't understand, seems like i need to define some kind of connection...? :o Anyone a clue what that stands for? roN
From: Rui Maciel on 3 Jun 2010 15:12 cerr wrote: > Hi There, > > I honestly doubt that I'm in the right group here for this question > but i couldn't find another more appropriate group - if some one could > direct me. Trolltech offered (and I guess now nokia offers) Qt's mailing lists through a NNTP interface, which I can't say enough good things about. Truly remarkable stuff. Please take a look at: http://lists.trolltech.com/ > I got a little UI going with a QTabWidget on it. On the bottom I have > two buttons, "<< perevious" and "next>>" with which i wanna let the > user "scroll" through the tabs. Now i got problems on how to modify > the currentIndex property of the tab widget that selects which tab is > currenly being displayed. > I've tried following: > void HelloForm::NextTab(void){ > if (widget.tabWidget->currentIndex()!=-1) > { > widget.tabWidget->currentIndex(TabIndex=+1); > } > } > But I'm getting: "HelloForm.cpp:62: error: no matching function for > call to 'QTabWidget::currentIndex(int&)' > /usr/include/qt4/QtGui/qtabwidget.h:106: note: candidates are: int > QTabWidget::currentIndex() const" You are trying to call a method, currentIndex(int&), which was never defined. QTabWidget only has int currentIndex() const. Maybe you intended to use QTabWidget::setCurrentIndex(). You can take a look at: http://doc.trolltech.com/4.6/qtabwidget.html Hope this helps, Rui Maciel
From: Leo Havmøller on 3 Jun 2010 23:22 "cerr" <ron.eggler(a)gmail.com> wrote in message news:4b127880-53e4-4a2c-9255-75aee97bf76b(a)o4g2000vbo.googlegroups.com... > Hi There, > > I honestly doubt that I'm in the right group here for this question > but i couldn't find another more appropriate group - if some one could > direct me. See the "newbie" forum on http://www.qtcentre.org/content/ I can also highly recommend the book "C++ GUI programming with QT4" - it's worth every cent. Leo Havm�ller.
|
Pages: 1 Prev: Simple hack to get $500 to your home. Next: getenv set/putenv in multithread program |