Source: www.brainyquote.com I may be drunk, Miss, but in the morning I will be sober and you will still be ugly. Winston Churchill Prayer is the key of the morning and the bolt of the evening. Mohandas Gandhi I look upon death to be as necessary to our constitution as sleep. We shall rise refreshed in the morning. Benjamin Franklin
Recently I had to implement a calendar for a TouchScreen application. I resorted to css to modify the calendar widget's appearance so that it would be more accessible. Following is the code that enabled me to get a proper calendar. calendar->setStyleSheet("QMenu { font-size:20px; width: 300px; left: 20px; }" "QToolButton {icon-size: 48px, 48px; font: 20px; height: 70px; width: 100px; }" "QAbstractItemView {selection-background-color: rgb(255, 174, 0);}" "QToolButton::menu-indicator{ width: 50px;}" "QToolButton::menu-indicator:pressed," "QToolButton::menu-indicator:open{ top:10px; left: 10px;}" "QTableView { font: 30px; }" "QSpinBox { width: 100px; font: 20px;}" "QSpinBox::up-button { width:40px;}" "QSpinBox::down-button { width:40px;}");
Recently I encountered that some threads are not launching in our application using QConcurrentRun. If you launched the same worker function over QThread it was working. So digging into this gave us this problem with defaults for Qt's global threadpool. Basically Qt sets global threadpool's max thread count to the no of cores you have on your processor. We were easily running out of the default four max threads. So we upped the count to 32 using following function: QThreadPool::globalInstance()->setMaxThreadCount(32); We set this at start of the program in main. Things have been fine since then!
Comments
Post a Comment