Results 1 to 4 of 4

Thread: Network Accessibility

  1. #1
    Join Date
    May 2009
    Location
    USA
    Posts
    300
    Thanks
    82
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Network Accessibility

    Small problem here - my application accesses the internet under certain conditions and if the internet is not available or is too slow to respond, the application crashes.
    The internet call is made in a separate thread and I do have a timer in that thread.

    I added code to check the networkAccessible property before I start the thread to make sure the net is available, but that property always returns -1 whether the network is available or not. So it still crashes when the internet is not available.

    Any suggestions?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Network Accessibility

    You need to give a lot more information.
    A working, minimal and compilable example that demonstrates the problem is needed.

  3. #3
    Join Date
    May 2009
    Location
    USA
    Posts
    300
    Thanks
    82
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Network Accessibility

    Ok tbscope, I'll see what I can put together. Probably won't happen until tonight as I have to work this weekend at the office.

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Network Accessibility

    networkAccessible can only tell you (at most) if the physical connection is available. It can not tell you if the internet is available - that would require attempting to connect to somewhere and setting the value of a flag based on the success or failure of that connection.

    It is strange however that your application should crash if it can't communicate with a server, but we would need to see your code to determine why.

Similar Threads

  1. Accessibility and Mac OS' VoiceOver
    By bear101 in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2010, 19:56
  2. MDI example and Accessibility plugin
    By nroberts in forum Newbie
    Replies: 0
    Last Post: 10th November 2010, 22:48
  3. Accessibility and QTabelWidget
    By spacer2004 in forum Qt Programming
    Replies: 0
    Last Post: 11th September 2009, 14:52
  4. Accessibility in Qt on Vista
    By bear101 in forum Qt Programming
    Replies: 18
    Last Post: 1st August 2009, 06:48
  5. Linux/X11 Accessibility
    By bpetty in forum General Programming
    Replies: 7
    Last Post: 23rd July 2009, 09:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.