Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • Viewable but non-editable tables

    2
    0 Votes
    2 Posts
    2k Views
    A
    You can use Qt::ItemIsEditable, Qt::ItemIsEnabled flag for QTableWidgetItem
  • Save a file in the same directory as QSettings

    11
    0 Votes
    11 Posts
    8k Views
    G
    [quote author="neFAST" date="1308696036"]I can understand this. However I don't know what I should request. I just said [quote author="neFAST" date="1307718701"]On win7, qsettings are stored in appData/Roaming while QDesktopServices::DataLocation points to appData/Local[/quote] but is it a bug? What should be the correct behavior?[/quote] I do not have an idea. I would have to read on that topic first. Maybe some googling gives you more information. Sorry that I cannot give you a more useful answer.
  • How to get only the last system event from a specific type ?

    5
    0 Votes
    5 Posts
    2k Views
    D
    I think I have found some kind of workaround: if I ignore() QEvent::TabletMove events, they get transformed into mouse event, so I only have significant mouseevent instead.
  • Save a QString to sqlite and fetch it back?

    2
    0 Votes
    2 Posts
    2k Views
    G
    I would recommend to use Qt's SQL classes for storing and retrieving data. They should handle the conversion pretty good and you can operate on QStrings directly. The SQLite driver of Qt should be available with all binary installations.
  • [SOLVED] Non-Latin Unicode Strings Not Showing

    2
    0 Votes
    2 Posts
    3k Views
    M
    [quote author="rufus359" date="1308781208"]UPDATE: Apparently Qt is not able to find the fonts on my machine and insists on using its own. Creating a symbolic link to a font that supports Japanese characters in the "[QtDir]/lib/fonts" folder solved the problem.[/quote] Cheers for the update, and welcome to the devnet :)
  • How dynamic plugins work with resources?

    7
    0 Votes
    7 Posts
    6k Views
    G
    bq. A plugin is simply a shared library I have a "bad habit" think that shared library is exactly an executable just with unresolved external links. That assumes resources are located inside this executable. Probably you know where from this habit appeared... This is my first time working with plugins in Qt. Need to change some conceptions.
  • 1 Votes
    4 Posts
    8k Views
    D
    Someone from the StackOverflow forum answered my question very nicely: http://stackoverflow.com/questions/6433933/qtcpclient-successfully-connects-but-not-to-my-server-where-is-it-connecting bq. While QTEST_MAIN creates a QApplication and runs all your tests, it does so sequentially and not with an event loop. Therefore, while your socket can indeed connect to the server (meaning qTestSocket->waitForConnected() returns true), since the app doesn't return to an event loop, the QTcpServer's signal will not get emitted, and TcpCommSocketTest::connectDummyServer() never gets called. Try adding a call to qApp->processEvents() at the end of initTestCase(). It should let connectDummyServer() be called. It seems that I needed to add a qApp->processEvents() call in my initialization function.
  • Which is best for parsing in Qt???

    9
    0 Votes
    9 Posts
    5k Views
    T
    i have also agreed that qxmlstream* api is faster and occupy less memory. it is helpful in mobile devices where less memory is avilable
  • [SOLVED] How to force QSqlTableModel to use UTF-8 encoding?

    35
    0 Votes
    35 Posts
    26k Views
    S
    I removed uft8_bin from table option tab in MySQL Admin. but each time I insert data using MySQL Query Browser, colliding method is added to all tables of database. I'm going to create re-database with mysql cli. Thank you very much :-) UPDATED: I do everything from beginning, and remove every colliding method. Now everything works fine: !http://s1.picofile.com/file/6846154924/screenshot9.png()! Thanks again.
  • 0 Votes
    12 Posts
    7k Views
    V
    Oh, I just got it. Thanks for your patience!
  • [SOLVED] stylesheet on QTableWidgetItem just edited

    9
    0 Votes
    9 Posts
    7k Views
    E
    I just found a solution : " QAbstractItemView {" "selection-background-color: rgba(0,0,0,0);" It makes the cream background disappear thanks to transparncy. Hope it could help someone. Thnaks for help anyway.
  • Associate

    7
    0 Votes
    7 Posts
    3k Views
    G
    This wiki article describes a class you can use as editor main window class. it enables associating file extension to the exe during first start, like MFC does. It also enables MDI handling do newly opened files are opened in the running process. But this code only works for windows, definitly.
  • Check QVariant type

    4
    0 Votes
    4 Posts
    15k Views
    L
    [quote author="loladiro" date="1308738072"]After reading the sources: @ QVariant(float f) { d.is_null = false; d.type = QMetaType::Float; d.data.f = f; } @ Yes it is! Although you could use int QVariant::userType() if you feel more comfortable comparing to an int.[/quote] Thanks. [quote author="Andre" date="1308739392"]Note that in Qt 5, the distinction between QVariant::Type and QMetaType::Type will most likely go away.[/quote] That's a good news...
  • Infinite loop and signal deluge

    35
    0 Votes
    35 Posts
    21k Views
    J
    No in fact I emit more than once, I just simplified my sample code.
  • [SOLVED]display image through http url

    12
    0 Votes
    12 Posts
    28k Views
    F
    [quote author="TobbY" date="1308721124"]:-) sorry, my mistake[/quote]Qt DevNet: If we point at something, it's bound to be a mistake. :P
  • Crashed at QCoreApplication::sendSpontaneousEvent

    4
    0 Votes
    4 Posts
    5k Views
    F
    @Gerolf Thanks. deleteLater worked :D
  • [Solved] Upgrade help I can't seem to uninstall sdk1.1.1

    3
    0 Votes
    3 Posts
    2k Views
    R
    ok i figured out how to remove correctly, i went into the folder of each sdk and ran the maintainance gui from the command like as sudo seems like since i installed the sdk as sudo, the maintenance gui from the menu is not getting run in sudo mode and therefore hangs i also had to select, 'remove old qtcreator settings' when installing sdk1.1.2, otherwise it was still pointing to the wrong (older) folder for qmake
  • 0 Votes
    12 Posts
    24k Views
    V
    Phew, I (almost) understand now. Thank you.
  • QDateTime::toTime_t () did not return correct result

    3
    0 Votes
    3 Posts
    6k Views
    G
    You'll get the correct result with this QDateTime construction: @ QDateTime testTime(QDate(1970, 1, 1), QTime(0, 0, 0, 0), Qt::UTC); @