Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 458.0k Posts
  • SetStyleSheet background-color doesn't work on a derived widget

    3
    0 Votes
    3 Posts
    11k Views
    R
    You mean If you subclass from QWidget, you need to provide a paintEvent for your custom QWidget as below: @void CustomWidget::paintEvent(QPaintEvent *) { QStyleOption opt; opt.init(this); QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); }@ The above code is a no-operation if there is no stylesheet set. Warning: Make sure you define the Q_OBJECT macro for your custom widget. Yes, thanks - that works. But i wonder, to have to do such overhead. Why isn't it implemented in QWidget itself?
  • Embedded scripting language in Qt application

    16
    0 Votes
    16 Posts
    8k Views
    Z
    Cool thanks for that Tobias. That will come in handy.
  • Questions about QMdiSubWindow title bar

    6
    0 Votes
    6 Posts
    6k Views
    I
    Thanks Gerolf.
  • How to add a UI file afterwards

    6
    0 Votes
    6 Posts
    7k Views
    A
    [quote author="h3rky" date="1301588003"];-) ... so could you be a bit more precise about the mentioned "involvingness" ... greets,[/quote] Well, you might start with the designer manual then on this "topic":http://doc.qt.nokia.com/latest/designer-creating-custom-widgets.html.
  • [Split] Transparent Main Window

    8
    0 Votes
    8 Posts
    4k Views
    V
    Edit findings: I noticed that the "invisibility" from the Shapedclock is not what i suspected It doesnt make the widget transparant but it makes it an Ellipse. So i stil havent found the solution yet. :(
  • QPrinter: PdfFormat and transparency

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • How to stop a QTimer::singleShot

    7
    0 Votes
    7 Posts
    50k Views
    L
    So it should be better to use a QTimer, set it with: @ setSingleShot(); @ thanks.
  • How to convert joystick values to string

    3
    0 Votes
    3 Posts
    2k Views
    G
    There is no general toString() like in java. You'll have to convert to QString with that's static methods: @ QString a1 = QString::number(joystick->getAxis(0)); @ You could have found this from the fine "QString documentation":http://doc.qt.nokia.com/4.7/qstring.html yourself.
  • Qt 4.4.3 not able to list directories and files from shared folder.

    5
    0 Votes
    5 Posts
    3k Views
    A
    Did you search the bugreports to see if this is or was a known bug? You might at least try and see if you see the same behavior in a recent Qt version. If so, than you might try to find the patch, and backport it to your version of Qt.
  • [solved] adding Qt to existing program

    45
    0 Votes
    45 Posts
    24k Views
    Z
    [quote author="mzimmers" date="1301501568"]Oh, this is OUTSTANDING. Thanks so much to everyone for their help in this thread. It may not seem like much to anyone else, but this is a major step forward for me.[/quote] You're welcome. The initial steps are often the most confusing with a new technology. I will shortly post a modified example that performs the calculations in a separate thread and uses signals to let the main GUI thread know about the current status. That way you;ll have an example on which you can build if you do need to do some seriously time consuming number crunching without blocking the GUI.
  • How do I get the Windows HINSTANCE handle?

    4
    0 Votes
    4 Posts
    14k Views
    C
    Thank you both. I have tried both solutions (plus about 3 others), but the SDK doesn't seem to be responding. I believe I will need to compile and debug within the SDK - something else must be going on. Thanks agian for your help and quick replies - sincerely appreciated! :) Chris
  • 0 Votes
    3 Posts
    4k Views
    K
    Thanks :) That worked nicely!
  • Resizing QGraphicsItems

    2
    0 Votes
    2 Posts
    3k Views
    Z
    Take a look at the docs for "QGraphicsItem::itemChange":http://doc.qt.nokia.com/latest/qgraphicsitem.html#itemChange. I think that can help you in this case.
  • QMatrix4x4 and OpenGL

    6
    0 Votes
    6 Posts
    7k Views
    B
    Hi there, correct my if I'm wrong but opengl can be used with floats. Just use gl...d instead of the gl...f in these case glLoadMatrixd Greetings, bbuerger
  • ActiveRecord in Qt

    25
    0 Votes
    25 Posts
    17k Views
    G
    Ok. As some help: main features are described in these classes: QstAbstractModelHandler (main class of the library) QstBatch QstField QstDefaultItemNameExtractor Filter FiltersManager QstComplete And I will answer all your questions. :)
  • How do I get the "natural" widget size?

    3
    0 Votes
    3 Posts
    21k Views
    R
    Afaik, setContentMargins is a function of the layout, not of the widget. As usual, thanks Gerolf. I should have been using setMargin(). sizeHint() is the one I was looking for.
  • [v4.7.2] Leak with static QMessageBox?

    2
    0 Votes
    2 Posts
    2k Views
    L
    Hm... this is strange. Have you run the test on other computers and/or OS? May be you should reported it as a bug? Best regards, Leon
  • [Solved] TableModel data not being called?

    1
    0 Votes
    1 Posts
    4k Views
    No one has replied
  • Adjust verticalLayout to centralWidget size ?

    3
    0 Votes
    3 Posts
    4k Views
    A
    Oh my god, I've read your sentence, i clicked two times and you saved me ! Many thanks :)
  • GSoap integration into Qt

    15
    0 Votes
    15 Posts
    17k Views
    S
    [quote author="awasay" date="1301400187"]Gerolf - I am using windows xp and mingw compiler but my original problem has now been resolved. Thank you for your help and time. It is my understanding that QtSoap is a paid addition and that support for it is very negligible that is why I was sticking with gSoap. Like Volker pointed out the problem was with the pkg_config addition in my original .pro file. It was not working. Instead of that I added the stdsoap2.cpp to my sources. The project now compiles. Both methods work, you can either add it like volker did above or you can simply copy paste it into the app folder and then add it to your sources. There is a lot of junk in my code due to all the hit and trial. I shall post the minimum requirements to run gSoap once I sort through all of this. Please continue this discussion with other problems that you are facing or have faced in the past.[/quote] I remember seeing this problem too and solved it by linking the library against binary I’m compiling properly. Maybe those scripts of mine helps about that. Are you using CPP mode or C mode of it? You need link different library regarding which way you are using. EDIT: And yeah, Google has been for me completely useless about gsoap, and their own documentation barely mentions CPP side of this... I basically read the files myself and that way forced it to work... C side works better but it’s very annoying to use. And using QtSoap is viable alternative if it is enough good for one’s needs; for me it was not.