tags:

views:

41

answers:

1

Im using QT for screen printing using :

QPixmap::grabWindow(QApplication::desktop()->winId())

i like the application to be hidden or at list be console none GUI application how can i do that in Qt?

A: 

You can start with Qt Console Application.

Remember to include <GtGui> in your headers.

Open your .PRO file, remove the line with -= gui

shader
my pro file looks like this CONFIG +=qt console QT += core network
then you can add 'QT += gui'Otherwise if you don't want to see the windows, you can 'hide()' it
shader
mybe because i have : public QWidget inherent in my applicationbut i have to inherent from somewhere to use the Qt funtionsdoes making the window hide() is the right way .. its doesnt looks like ...its just my feeling
OK, so you have a QWidget in your application, and you don't want it to appear... maybe you can think of your requirements again?
shader
@user63898, What kind of functions do you need? Inheriting `QWidget` gives you a `QWidget`; you can get the power of signals and slots without inheriting `QWidget`. (You can instead inherit `QObject`, for example.)
strager
as i asked in my question , i need the functionality of printing screen and after playing with the code it seams i have to have QWidget and this QWidget trigger the GUI window to appear