Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Inheriting QThread whitout calling start(), any problem ?

    5
    0 Votes
    5 Posts
    4k Views
    D
    Hm as long as QThread isn't owned by workObject it should be okay for the workObject to launch its thread and move itself there. I personally like it more when a third instance controls the thread and workObject creation and brings both together. This is helpful e.g. when you want to take the threads from a thread pool and feels slightly cleaner, because it keeps the achtual worker and the "low-level" thread handling separated.
  • How do I use mousemove with a timer

    2
    0 Votes
    2 Posts
    1k Views
    C
    I think you do not need a timer. see "MouseMoveEvent":http://qt-project.org/doc/qt-4.8/qwidget.html#mouseMoveEvent and "setMouseTracking":http://qt-project.org/doc/qt-4.8/qwidget.html#mouseTracking-prop
  • Some colors changes in QT forms without pattern

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Specifying different iconsets for the same widget

    7
    0 Votes
    7 Posts
    4k Views
    R
    I tried qxoz's suggestion of adding the <normaloff> and <selectedon> tags but with this, no icon is generated. Here's how my UI file looks like: I even added a <normalon> tag just in case and that did not help either.... @@ <widget class="LedButton" name="m_Standby_btn" > <property name="icon"> <iconset resource="VSMgui.qrc"> <normalon>:/images/images/whiteCircle_nt.png</normalon> <normaloff>:/images/images/whiteCircle_nt.png</normaloff> <selectedon>:/images/images/blueCircle_nt.png</selectedon> </iconset> </property> <property name="text" > <string>Standby</string> </property> <property name="visible"> <bool>true</bool> </property> </widget> @@
  • Modal QWidget with a non-QWidget parent

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Implement Qt in Windows service

    4
    0 Votes
    4 Posts
    3k Views
    D
    Well why don't you just look yourself? ;) http://qt.gitorious.org/qt-solutions/qt-solutions/blobs/master/qtservice/src/qtservice.h says BSD License, so it's free software. When I remember correctly LGPL is available, too, but BSD is more permissive anyway.
  • [Solved] QML real to string with 1 digit precision??

    4
    2 Votes
    4 Posts
    27k Views
    M
    Please be sure and edit your original post and add [Solved] to the title. Thanks!
  • Phonon::FatalError 0x80040266

    8
    0 Votes
    8 Posts
    7k Views
    B
    I'm having the same problem on a windows 7 64 bit VM machine. I can play some mp3's but not all. I downloaded an mp3 from amazon that did not work. Windows media player plays the mp3 fine. Not using phonon and trying to create the graph myself it did not work either.
  • [Solved] global eventfilter?! is it possible?

    5
    0 Votes
    5 Posts
    5k Views
    G
    thx
  • PostgreSQL connection program crash

    2
    0 Votes
    2 Posts
    2k Views
    S
    Solved, I had bad declaration of object PostgreConn. I fix it: @qDebug() << "PostgreSQL Inicialization starts"; PostgreConn *db; db = new PostgreConn("192.168.1.30", "5432", "postgres", "pass", "test"); db->close();@
  • [SOLVED] How to make Qt include source files/folders in compiled file? C++

    16
    0 Votes
    16 Posts
    7k Views
    W
    Well the best that could happen to me was that I could 'store' the helpcollectionfile (qhc) in a resourcefile (qrc). So it can easily be distributed. Cause this application is going to be used by hundreds, maybe thousands of users. And then it would be much easier to get it in just one executable. My colleague is coming back next week, i'll ask him if he has a decent solution. But thanks for the help anyway :) Great forums here
  • How to change style sheet of arrow buttons in QDateEdit?

    4
    0 Votes
    4 Posts
    4k Views
    A
    Qt Creator has a resource editor you might use, but you can also hand-craft resource files. It is a simple XML format. This is a sample from the documentation: @ <!DOCTYPE RCC><RCC version="1.0"> <qresource> <file>images/copy.png</file> <file>images/cut.png</file> <file>images/new.png</file> <file>images/open.png</file> <file>images/paste.png</file> <file>images/save.png</file> </qresource> </RCC> @ However, just to try if it works with images, you can also just leave them on the file system and provide the correct path. If it works, you can stick the images in a resource and compile the images into your application that way. Note that I am not sure that this is your solution.
  • Showing content of a file in the tabs

    3
    0 Votes
    3 Posts
    1k Views
    P
    Hello, I used tree to show my data in tree view in my tabs, which existed in main window. I think I may need a parser to pares my data, which are on the newly created file, also using setupModelData method in treeModel.cpp, and add it to my tree model. I am still worḱing on it.
  • QRegExp use find forward slash(/) and backward slash(\)

    4
    0 Votes
    4 Posts
    6k Views
    D
    the forward slash / has no special meaning in regular expressions. @QRegExp rx("([a-zA-Z]:[\\/]|[\\/]{2})");@ works for both backward and forward slashes. (Note I've removed the whitespace character from the drive letter) But beware, you should also allow unix paths like "/home/dermanu", so possibly group "[a-zA-Z]:" together and make it optional by appending a "?" character
  • QSettings doesn't create the INI file

    3
    0 Votes
    3 Posts
    6k Views
    T
    Hi, I think sync() will write to file only if you used QSettings::setValue(). Reading values does not change file, so sync() does not need to write it.
  • Phonon on Mac crash

    2
    0 Votes
    2 Posts
    2k Views
    J
    I also met a problem in using phonon on mac, but it came up after I quit the QT example app(QTmediaplayer.app). Did you met the problem likes me?
  • QFileDialog::getExistingDirectory dialog display in center of widget

    4
    0 Votes
    4 Posts
    3k Views
    F
    [quote author="mathi77in" date="1336551528"]i want display dialog box in center of parent widget(main window)[/quote] It could be an OS specific behavior.
  • [Solved] one problem with QDialogButtonBox

    3
    0 Votes
    3 Posts
    2k Views
    N
    It's OK now.Thank you
  • [SOLVED] the qt-way for creating sqlite-databases

    6
    0 Votes
    6 Posts
    6k Views
    C
    [quote author="jstaniek" date="1336511641"]Hi, Have a look at Predicate lib which has SQLite3 plugin: http://community.kde.org/Predicate It's Qt-only, LGPL, and unlike QtSQL it 'knows' how to create database and then new tables (has a Qt/C++ API for that). No need to pass SQL at all (but it can be if you wish). I am preparing this lib as a next get backend for Kexi and similar complex apps. The only downside - it's not yet released and its API isn't frozen, so you'd need a copy of it.[/quote] Thanks, this sounds like exactly what I have been looking for. Unfortunatly I'd prefer to avoid any dependencies (except Qt itself) as much as possible. I just hoped that there simply is a qt-api for my case that I simply couldn't find. I will accept that there is no api by qt, so I will do it by hand with SQL-commands. [quote author="Rahul Das" date="1336509988"]You might want to go through the "MVP":http://qt-project.org/doc/qt-4.8/model-view-programming.html as well.[/quote] I don't know what for since it doesn't have to do with my "problem".
  • [SOLVED]QProgressBar stylesheet problem

    4
    0 Votes
    4 Posts
    4k Views
    S
    [quote author="glararan" date="1336503116"]I add it to code...nothing changed EDIT:SOLVED[/quote] Hi, You need to EDIT your first post and append SOLVED if you got the answer. If not then you can provide your code so that we can figure out the above behavior of the progress bar. As it has already been explained above that stylesheets mostly deals with the look and feel of the component. Thanks :)