PDA

View Full Version : Dialog box that to select network computers ?



npc
12th April 2007, 18:41
Hi,

I want to call a Dialog box to select network domains/computers for user selection.
It should be like a QFileDialog window.

how can I do this ?

I am using Qt 4.2.2/Windows server

Thanks,
NPC

patrik08
12th April 2007, 18:58
Hi,

I want to call a Dialog box to select network domains/computers for user selection.
It should be like a QFileDialog window.

how can I do this ?

I am using Qt 4.2.2/Windows server

Thanks,
NPC

Open qt designer select new Dialog button or not....
save the file on projekt dir/ui
download QTutils tool -> http://ppk.ciz.ch/qt_c++/QT_utils.zip
cd QT_utils
qmake
make

Open QTUtils insert the class name on top && generate the code as header & source ... or only as header....

Put the file on projekt dir && run && main.cpp
on cmd dir qmake -project
call the dialog on main...

but on top from pro file ...

MOC_DIR = build/.moc
RCC_DIR = build/.rcc
OBJECTS_DIR = build/.obj
UI_DIR = ui

and final
qmake && make. :)


PS attachment QT_utils print screen to generate code...

npc
12th April 2007, 19:27
Is this a solution for my question ? :(

marcel
12th April 2007, 19:38
Well, the solution is not as easy as you think!

Qt doesn't provide Network Neighborhood support. But you can implement it...

The GUI for this will be the easiest thing to do( probably for the view you want a tree view ). You can use designer to achieve this.


To find all the computers near you ( the same that are visible in Windows Explorer ) you will have to use the WNet* functions. These are pretty well documented in MSDN ( with a few examples ).

To enumerate the network resources you use WNetOpenEnum and continue with WNetEnumResource to find all resources.

When you're done you must call WNetCloseEnum.

If msdn examples do not provide enough to get you started, you can ask here.
You should start here: http://msdn2.microsoft.com/en-us/library/aa385391.aspx

Regards.

patrik08
12th April 2007, 19:52
Is this a solution for my question ? :(

sorry i supposed .. the dialog ist the problem..:o

If your win server is as router or win domains .. arp can help to find pc ....
You muss only attach qprocess to dialog...
or have a look on code http://sourceforge.net/projects/arpdig/