Skip to content
Qt 6.11 is out! See what's new in the release blog
  • 145k Topics
    724k Posts
    J
    Hey, I have an issue I can't seem to solve. In my application I create a pop-up window using QWidget. It shows up fine, accepts keyboard no problem. I connected a button. the reminder of the code doesn't really matter, saves data - that's all. But I want the button to close the pop-up, which also works 100% correctly. My issue is that when it closes, comes back to where the app were before the pop-up, I can't seem to be able to input anything to QLineEdits in the displayed window from the keyboard (that previously worked). I tried resetting them by using qLineEditName.setRealOnly(false); or even qLineEditName.setAcceptDrops(true); It's all in c++ obv. Honestly, no clue what I'm missing. P.S. I know making a global variable is a big no-no in regards to the esthetics of the code but hopefully it can be forgiven :) QWidget* popUpNewTime; QTimeEdit* timeChoicePopUP; QPushButton *button1; void edit::on_addTime_clicked() { //Creating pop-up with time choice and a save button popUpNewTime = new QWidget(this, Qt::Popup); popUpNewTime->setWindowModality(Qt::WindowModal); QRect rect = QStyle::alignedRect(layoutDirection(), Qt::AlignBottom, QSize(width()/4, height()/6), geometry()); popUpNewTime->setGeometry(rect); QVBoxLayout* layout = new QVBoxLayout(popUpNewTime); timeChoicePopUP = new QTimeEdit(); button1 = new QPushButton("SAVE"); layout->addWidget(timeChoicePopUP); layout->addWidget(button1); timeChoicePopUP->activateWindow(); timeChoicePopUP->grabKeyboard(); popUpNewTime->show(); connect(button1,&QPushButton::clicked,this, &edit::addingTime); } void edit::addingTime() { timeChoicePopUP->close(); button1->close(); popUpNewTime->close(); }
  • Jobs, project showcases, announcements - anything that isn't directly development
    4k 23k
    4k Topics
    23k Posts
    T
    I've reported it there: https://qt-project.atlassian.net/browse/QTBUG-148568
  • Everything related to designing and design tools

    132 397
    132 Topics
    397 Posts
    SGaistS
    Hi, I think the wiki has the starting point Hope it helps
  • Everything related to the Software Quality Tools

    95 261
    95 Topics
    261 Posts
    T
    Hi, just getting into Squish and I was wondering if anybody has any more advanced documentation or projects of MBT setups? I am trying to understand the limitations and possible application in my use case. I am unsure mostly of two things: Model generation through imports of existing graph files etc. automated path (test case) generation mostly if possible at all (found conflicting info) and if so how well it works. Any help, experience or pointers appreciated! thanks tim
  • Everything related to learning Qt.

    401 2k
    401 Topics
    2k Posts
    S
    [image: 286e3dad-f335-48d7-931b-362b4cb89ef4.png] Here is my business card solution image.
  • 2k Topics
    13k Posts
    L
    Qt 6 for HarmonyOS developement update - July 23 Want to support phone device type? (Note: this is not enabled by default yet) See the patch in https://codereview.qt-project.org/c/qt/qtbase/+/754676 Thank Andy Nichols for his effort to support phone device. (Background: On July 2, Huawei officially announced that the number of terminal devices using its HarmonyOS operating system has exceeded 70 million. And about 80-85% are phones.) #Qt #HarmonyOS #OpenHarmony #Huawei [image: 1784783525042?e=1786579200&v=beta&t=GAIpYASb8VO1b6_bCH2Nwg-Nn3G_hm2jc7aHvN7_Z1s]
  • 4k Topics
    18k Posts
    J
    どのプラットフォームでアプリを作っていますか。 もしWindowsなら、簡単にできりますが、macOSやらUbuntu/ Gnomeやら上ではあまり簡単ではありません。 凡そ、実行ファイルのアイコンなら、Qt自身は関係があまりありません。実は、Windowsなら、*.rcファイルの仕上げの後、Cmakeに「qt_add_executable(App ... app.rc」と書いて、本物のapp.rcの中で、「IDI_ICON1 ICON DISCARDABLE "app_icon.ico"」と書いたらできそうです。macOSの方も似ているが、「.icns」と「Info.plist」の整備はWindowsよりめっちゃ面倒のそうであってしまうといいます。 もちろん、cmakeファイルの中にはプラットフォームを分類するために以下のcodeを加えなければなりません: if (${CMAKE_SYSTEM_NAME STREQUAL "Windows") set(Windows_Resources "...") elseif (... "Darwin") # macOSになる set(MacOS_Bundle "...") ...
  • This is where all the posts related to the Qt web services go. Including severe sillyness.
    1k 10k
    1k Topics
    10k Posts
    SGaistS
    Ok, akismet triggering is not always clear. Beside this issue, what was your question about ?