Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Need help in qt-creator!!!
ibancioiu last edited by
i'm new in qt... and in c++ programming
i want to know what i have to do, to set a button to open a new window (i'm using linux)??????
so i have a button in a window-> i'll press the button and after this a new window is showing up;
SORRY FOR MY ENGLISH!
You should be sorry for putting 6 question marks together instead :) And using a non-informative topic's subject.
You have to connect button's onClicked() signal to a custom slot (Qt Creator can make that automatically for you). In your slot, invoke show() method of your new window (and, of course, instantiate it somewhere earlier in your code). In Qt, code is the same for all platforms, so the info about GNU/Linux is probably not needed here. I don't know how much "new" to C++ are you, so I'll leave it at that for now. If you don't understand, I can clarify. But, before asking, try using Qt documentation, it's very well written. Topics you might be interested in are "signals and slots", "QMainWindow", "QDialog", "QPushButton".
lgeyer last edited by
Do yourself a favor and learn programming, learn C++ programming, learn Qt - in this order. You will save yourself a lot of troubles.
qxoz last edited by
walteste last edited by
I agree, if you don't have solid C++ knowledge, then you will end up in troubles or very buggy code.
Please take the comment of Lukas Geyer very serious.
shadowfox last edited by
find a c++ book first