3rd party library for Qt QNetworkConfiguration and QNetworkConfigurationManager classes
Our dev environment:
OS: Windows 10 and Mac OS latest Qt: 5.15.2
QNetworkConfiguatoin and QNetworkConfiguratoinManager, these classes are obsolete in Qt 5.15.2. Last week I had posted a query here.
Is there any 3rd party C++ library which provides the same functionalities? As our application is for both Mac and Windows, it will be good to have a library supported for both the platform.
See also questions close to this topic
Can a web client access local server?
As the title suggests : I want to connect a web client (developed using
vue.jsbut that's not a must) to a local database (available in the same machine as the client that is served from a distant server). Is it possible ?
Some context :
- I am building a website (
Laravel & vue.js) that has an admin panel.
- The admin has also a desktop application (that cannot be modified and doesn't provide any API to interact with).
- This desktop application connects to a local database (
- I need my client (
vue.js) application to access this database (only when it runs in the same computer. If the admin connects from a different computer, the functionality is not needed).
Is there a way for my client application to :
- Detect if it's running in a computer where the
Firebirdserver is running
- If such process is running, it tries to connect using the provided credentials (after success, I connect to it like I would to any other database)
- Otherwise it does nothing
- The web client won't necessarily be developed using
- I considered giving the local desktop a static IP than make calls from the server directly to the computer (whenever connected) but I don't like this solution as I'll be serving the client application to the admin's desktop, I would prefer to directly connect to the database instead of (double) remotely connect to it (client app connects to backend app and backend app connects to local database that is running in the same computer as the client app).
- I am building a website (
Ruby: TCPServer is not seeing that client TCPSocket has closed
While running a TCPServer in ruby 2.7.0, I want to see when my client has closed the connection (or is unable to continue reading). However, when I check on the server, I never see that the connection has closed.
I've tried using a bunch of the different ruby socket primitives but nothing seems to work here. I've tried writing to the socket as well in hopes of forcing an error but that doesn't seem to help.
I'm including an example here:
# main.rb require_relative 'server' PORT = 9000 server_thread = Server.thread socket = TCPSocket.open("localhost", PORT) socket.puts '5' server_thread.join(1) socket.close puts socket.closed? server_thread.join(2)
# server.rb require 'socket' class Server def self.thread Thread.new do server = TCPServer.open(PORT) while true server.accept do |socket| while true socket.puts '1' # why doesn't this ever happen? puts 'closed' if socket.closed? end end end end end end
ruby main.rb, this code outputs
Whereas I expect it to output:
Adding Routes to connect to other networks using Linux
I'm practicing penetration testing and I'm in front of a basic routing exercise. The context is the following: I'm using a virtual machine with Kali Linux from which I connect in VPN to the network that provides hosts for the exercises. Before connecting, typing the route command I get the following output:
root@kali:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.8.1 0.0.0.0 UG 100 0 0 eth0 192.168.8.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
after the connection instead, this one:
root@kali:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.8.1 0.0.0.0 UG 100 0 0 eth0 192.168.8.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0 192.168.193.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
and this is the output of the ip route command:
default via 192.168.8.1 dev eth1 proto dhcp metric 100 192.168.8.0/24 dev eth1 proto kernel scope link src 192.168.8.102 metric 100 192.168.193.0/24 dev tap0 proto kernel scope link src 192.168.193.70
So, the 192.168.193.0/24 is the internal network; from this one, it is possible to reach other networks. One of the task is to find wich ones and add a route to reach them.
To find the network, I have a wireshark file that show as from the 192.168.193.0/24 network's hosts, we can reach 2 web server, with these ip address:
So, what I have to do is to add a route from my internal network to this 2 others. i am trying commands like this
ip route add 10.86.74.0/24 via 192.168.193.1 dev tap0
the nex route table looks like this
Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.8.1 0.0.0.0 UG 100 0 0 eth1 10.86.74.0 192.168.193.1 255.255.255.0 UG 0 0 0 tap0 192.168.8.0 0.0.0.0 255.255.255.0 U 100 0 0 eth1 192.168.193.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
but once i try to ping i get this
ping 10.86.74.7 PING 10.86.74.7 (10.86.74.7) 56(84) bytes of data. From 192.168.193.70 icmp_seq=1 Destination Host Unreachable From 192.168.193.70 icmp_seq=2 Destination Host Unreachable
Please Help me, i have no clue what else i can try.
Checkbox in QToolbar
How can I add a checkbox to a
QToolbar? You can add a
setCheckable(true)on it, but that gives a toggle button rather than an actual checkbox.
- How to display selection effect QLineEdit in QTableWidget
PyQt5 How can I update cell value Qtablewidget in iteration loop using python
I want to update cell of row one by one.Just like in Ajax, table value updating one by one row.Currently I am using iteration loop for updating table one by one row.but it does not updating row one by one also freeze GUI when background process is running. Is there any other way for achieving one by one row updation. Creating table I have used QtableWidget.
with open('test.csv') as f: reader = csv.DictReader(f) for i,row in enumerate(reader): print("i",i) print(row) marks= row['Marks'] total= self.total(marks) self.tableWidget.setItem(i, 4, QTableWidgetItem(str(total))) time.sleep(1)
Issue with getting freeze GUI and not updating row one by one. I want to update it one by one. Please give me suggestion, Thank you in advance.