[Qt-interest] qt how to use multi-screen

tang ke tangk at lemote.com
Thu Jul 21 10:10:16 CEST 2011


于 2011年07月21日 14:01, Sudheesh Krishnankutty 写道:
> Hi,
>
> Suggest go through the documentation of QDesktopWidget, assuming that you
> want to use multiple monitors in your program. What exactly is your
> requirement?
yes,I want to use multiple monitor in my program.

the next is my test code:

#include <QApplication>
#include <QDesktopWidget>
#include <QPushButton>
#include <QDebug>
int main(int argc, char **argv) {
QApplication app(argc, argv);
for (int i=0;i<app.desktop()->screenCount();i++) {
QWidget * dialog = new QWidget(app.desktop()->screen(i));
dialog->show();
qDebug() << app.desktop()->screen(i);
}
return app.exec();
}

the loop execute twice.
but I get the same pointer of app.desktop().screen(i)

> Regards,
> Sudheesh
>
> -----Original Message-----
> From: qt-interest-bounces+sudheesh=softjin.com at qt.nokia.com
> [mailto:qt-interest-bounces+sudheesh=softjin.com at qt.nokia.com] On Behalf Of
> tang ke
> Sent: Thursday, July 21, 2011 11:11 AM
> To: qt-interest at qt.nokia.com
> Subject: [Qt-interest] qt how to use multi-screen
>
> hi guys
> I want to use qt to build a application in order to make screen multi.
> who can give me source code to see.
>
> OS:windows xp
>
> thanks in advance.
>


-- 
Best Regards


Tang Ke (Application develop of software department)
Tel:0086-512-52308628 Fax:0086-512-52308688
Phone:18962393077
E-mail:tangk at lemote.com  MSN:tangk at lemote.com, mumutouv at gmail.com
Web: http://www.lemote.com <http://www.lemote.com/>
JiangSu ZhongKe Lemote Technology Co.,Ltd
MengLan Industry Park,YuShan,ChangShu City,JiangSu,China

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tangk.vcf
Type: text/x-vcard
Size: 442 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110721/23a8cf9c/attachment.vcf 


More information about the Qt-interest-old mailing list