QTableWidget mouse click interface no response after the data interface is not responding

1. Problem : After the data appears on QTableWidget, the interface does not respond, does not respond to mouse clicks, but can still normally receive data, can not be closed even close button, the program must be shut down by killing the process. Some computer is unresponsive, some computers they can.

2. Analysis : The reason the interface is not responding:

(1) program crashes stuck, click become unresponsive, but the data is still receiving normal, is not excluded

(2) there has been a modal dialog box on the screen, only to close the modal dialog box before they can click on another interface. And the program can be executed properly. Just interface unresponsive.

3. troubleshooting steps :

View Data window appears in the display, especially the custom window. I added in QTableWidget data, operation column is a customizable widget class, class QTriggerResourceWnd: public QWidget. Then call setCellWidget function to add custom widget window.

QTriggerResourceWnd * pTrgger = new QTriggerResourceWnd();

ui.tableWidget->setCellWidget(step, 8, pTrgger);

By commenting out the line ui.tableWidget-> setCellWidget (step, 8, pTrgger); can be a normal response, it is described QTriggerResourceWnd modal dialog.

So to speak constructor provided by adding a line of code is non-modal: setWindowModality (Qt :: NonModal);

 

4. Conclusion: due to the system environment, some default Qwidget computer as a modal dialog box, some default Qwidget non-modal dialog box, it is preferably provided setWindowModality (Qt :: NonModal) code; window force set to a non-modal, so that a non-modal windows are displayed in a different system environment, the interface will not be unresponsive.

 

Own a stock monitoring software, has the following functions, interested friends can download;

(1) stock monitoring. Real-time monitoring of changes in stocks, individual stocks can monitor large single transaction, the rapid move up and down the main entrance and exit, stock remind highest and lowest points. Detected the highest points, the lowest point, the main entry point, the main exit point, the rapid move up the point, the point rapid decline, given a voice or sound alerts, no longer time looking at the broader market, and give you more free time;

(2) market surveillance. Monitoring the broader market trend, the use of Shanghai, Shenzhen, the three major indices of entrepreneurship composite index as the market trend. And real-time monitoring of the market's highest and lowest points in the middle of a turning point.

(3) stock recommendations. According to historical data can also be short-term or long-term trend analysis, more than 3,000 stocks on the stock market analysis and comparison, select a good stock rally, in accordance with the growth rate descending order, to recommend to you a good rally in stocks;

download link:

The latest version of

1.0.5 version of the new market and individual stocks lower limit alarm

Link: https: //pan.baidu.com/s/1swkQzCIKI3g3ObcebgpIDg

Extraction code: mc8l

Micro-channel public number: QStockView, containing the video and the latest release;

 

Guess you like

Origin www.cnblogs.com/bclshuai/p/11344800.html