Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Where is the QtSDK download link? [Solved]

    6
    0 Votes
    6 Posts
    3k Views
    B
    [quote author="demolitiontv" date="1353591040"]Apologies for not fully understanding you - does the version of Qt5-beta-2 that is available from the page http://qt-project.org/downloads include the Nokia-Qt-SDK, or just the desktop SDK?[/quote] Digia is no longer supporting Nokia' devices. If you want to develop for Nokia devices, you have to download the SDK directly from the Nokia site.
  • How to write QByteArray to Position 0

    9
    0 Votes
    9 Posts
    3k Views
    B
    Another solution: use the QTemporaryFile write the header here, and after this, you can append the second file after the first temporary file, or something similar ...
  • [solved] Get Standard Item from Index returns NULL for QTreeView

    9
    0 Votes
    9 Posts
    10k Views
    S
    Yes I too agree with Gerolf's explanation . I was just curious to reproduce the same for my testApp. Anyhow since its working you can edit your first post and prepend [Solved] to the title. Happy Coding!!! Regards Soumitra.
  • [SOLVED] QSqlRelationalTableModel and "Lazy population"

    3
    0 Votes
    3 Posts
    2k Views
    G
    Add “[SOLVED]” to the topic’s title :)
  • How to display Details of Audio File in QTreeView

    1
    0 Votes
    1 Posts
    876 Views
    No one has replied
  • [Solved] How to convert REG_SZ to String

    9
    0 Votes
    9 Posts
    6k Views
    H
    please add [solved] to the topic of this thread.
  • Remove item from QToolBox

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Subclassing QThread - Changing the community note

    5
    0 Votes
    5 Posts
    2k Views
    K
    The new documentation for 5.0 will be updated to promote the best practise of not subclassing QThread. Hopefully this will end all the questions related to subclassing QThread and the problems that arise from this.
  • [Solved] Conversion from DWORD to QString

    9
    0 Votes
    9 Posts
    11k Views
    sierdzioS
    Pleasure. Please add "[Solved]" to the beginning of the topic's title if you consider this to be solved.
  • Not able to build a Qt project in visual studio 2005

    12
    0 Votes
    12 Posts
    4k Views
    K
    [quote author="Vikuseth" date="1353560942"]So you are saying vsaddin is used only to build a Qt project inside VS2205 ? [quote author="Flavio Portela" date="1353543932"]you compiled only QtSDK released. In Visual Studio configure in mode released. or Rebuild QtSDK for --released and --debug vsaddin just necessary if you use VS-IDE for build your project. Use qtcreator6.0, he compile in vs2005 and or mingw without IDEVS2005 or greater.[/quote] [/quote] vsaddin helps you to manage projects within the vs2005 IDE (and other vs versions). However, you need to have a licensed vs version. The free express versions do not allow addins. You can load .pro files and create .pro files for compatibility with creator respectively other qmake driven environments. When using vsaddin you do not need to bother qmake. The creation and use of Qt in the IDE is seamless.
  • [SOLVED] how to use QRegExp to find some continue spaces?

    3
    0 Votes
    3 Posts
    5k Views
    C
    So you have numbers right justified in fixed width columns and you want to work out the widths of the columns, which includes the leading spaces. @ QString line(" 178542 5 5 5 0 1447 33386 1452 1452 44585 44631 1452 44576"); QList<int> widths; QRegExp re("\s+\S+"); int pos = 0; while ((pos = re.indexIn(line, pos)) != -1) { widths << re.matchedLength(); pos += re.matchedLength(); } qDebug() << widths; // (12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8) @ Of course, it won't work if some of the columns are "empty" or if the column can contain spaces.
  • Read pointers of a process

    3
    0 Votes
    3 Posts
    1k Views
    I
    Probably l3e0wulf talks about function like ReadProcessMemory from WINAPI.
  • Qt & VS2005 MFC

    7
    0 Votes
    7 Posts
    3k Views
    F
    you not need the vsaddin utilie qtcreator6.0 and compile for mingw and vs2005.
  • Terminating all threads.

    2
    0 Votes
    2 Posts
    2k Views
    M
    Not exactly sure what your problem is. But in general you should not terminate threads, using QThread::terminate() because it may terminate the thread at an arbitrary position, which could result in resources not being freed up properly or data being left in inconsistent state (and other evil side-effects). Instead, use QThread::wait() to wait for the thread to terminate. Do this for all the QThread objects that you have in your QList<QThread*> list and you can be sure they all have been terminated - given that the list is complete. In addition to that, you might want to have a global "terminate" flag, which you set to TRUE as soon as you want your threads to terminate. The code executed by each thread should then check that flag at regular intervals and exit as soon as possible (but cleanly!), when the flag is set. @volatile bool g_terminate = false; QList<QThread*> client_thread; //Main Thread void TCPServer::stopServer(void) { [...] //tell all threads to terminate asap g_terminate = true; //Wait until all threads have finished foreach(QThread *term_thread, client_thread) { bool ok = term_thread->wait(5000); //Thread did not terminate (timeout), probably deadlocked! if(!ok) { qWarning("Thread is deadlocked, going to terminate, expect trouble!"); thread->terminate(); thread->wait(); } } } //Worker Thread(s) void MyThread::run(void) { while(moreWorkLeft && !g_terminate) { doSomeWork(); } } @
  • Printing jpeg images in Qt with special quality

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Qt way to install a package under Linux?

    2
    0 Votes
    2 Posts
    1k Views
    P
    I think the best and more secure way is to create distribution specific packages and let the package manager handle required and optional dependencies. I suspect the applications that offer to install optional dependencies use the distribution's package manager in the background.
  • [Resolved] Select Button Effect without use CSS style...

    2
    0 Votes
    2 Posts
    1k Views
    D
    Resolved using CSS: @ pushButton->setStyleSheet("QPushButton {font-weight:bold;}") @
  • Empty rows in QTableWidget

    10
    0 Votes
    10 Posts
    16k Views
    D
    [quote author="ChrisW67" date="1353472147"]I assume the slot is being called because you are manually connecting something to it. You have a slot called on_procTable_updated(bool) in your class that the ui->setup() tries to find a match for in the UI using QMetaObject::connectSlotsByName(). It fails because you do not have a widget called "procTable" that has a signal called "updated(bool)" in that UI. It's a warning, not an error. You can avoid it by naming your manually connected slot so it does not match the magic pattern. [/quote] Thank you, that explains a lot. I've gotten rid of the warning now. I was under the impression that by the way I had named the signal and the slot they should have successfully connected without the call to connect(), though.
  • [solved] Write into Excel table

    2
    0 Votes
    2 Posts
    4k Views
    S
    I found the solution here "Writing a Range of Rows & Columns to a Worksheet":http://www.qtforum.org/article/34059/qt-and-excel-writing-a-range-of-rows-columns-to-a-worksheet.html
  • Unsuccessfully post Event

    5
    0 Votes
    5 Posts
    2k Views
    P
    thanks. but my basic idea is to simulate a wheel Event as soon as something happen. post QWheelEvent is one of my choose. I have no idea what is wrong with my code above? welcome any other talent.