View Full Version : How to pass a QComboBox to a function?
Ricardo_arg
9th March 2008, 21:12
hi guys, i am new using Qt4 and i am trying to manipulate multiple QComboBox with a single function, but i can pass the object to the function to manipulate whatever QcomboBox that i want with this single function. thx
wysota
9th March 2008, 21:16
You can pass a pointer to the object.
Ricardo_arg
9th March 2008, 21:30
sorry how do i do that?
i mean this is the function
//declaration of the function
virtual void f1(QComboBox *)
//implementation
void MyApp::f1(QComboBox *combo)
//use
f1(&combo);
i have try to use it, but oly error in compilation
plz any guide
wysota
9th March 2008, 21:49
sorry how do i do that?
I don't really see how I could answer that question :)
I suggest you improve your C++ skills before trying to learn Qt, it seems you have some problems with it... Take a look at our Links section, there is a link to "Thinking in C++" book available online.
Ricardo_arg
9th March 2008, 22:16
solved thx, i will red the book, i am a lilttle oxidate!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.