Results 1 to 2 of 2

Thread: Network interface, combo box problem

  1. #1
    Join Date
    May 2014
    Posts
    7
    Qt products
    Qt5
    Platforms
    Windows

    Default Network interface, combo box problem

    Hi there i got my combo box working and showing all available network interfaces. however the gui keeps showing an extra combo box at the top left. i understand the code has added a new box, so i have tried to manipulate the code to recognize that the box should be the one i already made. unfortunately i seem to make the coding worse :/ any ideas


    QComboBox *box = new QComboBox(this);
    QList<QNetworkInterface> list = QNetworkInterface::allInterfaces();
    foreach (QNetworkInterface iface, list)
    {
    ui->comboBox_Interface->addItem(iface.name());
    }

  2. #2
    Join Date
    Oct 2013
    Posts
    41
    Thanks
    1
    Thanked 8 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Network interface, combo box problem

    Are you even using the new QComboBox you are making?
    QComboBox *box = new QComboBox(this);
    It looks like you are populating comboBox_Interface.
    I would just take out the first line.

Similar Threads

  1. Replies: 4
    Last Post: 2nd July 2012, 09:04
  2. Deduct network interface from incoming UDP Packet
    By mastupristi in forum Qt Programming
    Replies: 1
    Last Post: 29th March 2012, 17:09
  3. Binding QTcpSocket to a specific network interface
    By vkincaid in forum Qt Programming
    Replies: 0
    Last Post: 14th May 2010, 21:28
  4. Replies: 12
    Last Post: 22nd March 2009, 11:22
  5. Replies: 0
    Last Post: 18th March 2009, 06:33

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.