Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • 0 Votes
    10 Posts
    4k Views
    P
    Both the problem is now solved. Previously i was not able to read from file because the file path was under different user and the second problem of extra character was due to the missing of text flag as suggested by "sierdzio". Thanks all.
  • ActiveQt and writable Q_Property

    2
    0 Votes
    2 Posts
    2k Views
    R
    It turns out that when loading an ActiveQt widget into an .NET forms in the designer view the content of the Q_PROPERTY is copied by visual studio and store in the .NET executable. If the default value of the Q_PROPERTY changes at a later stage, the .NET copy is not updated unless the component is reloaded into VS2005. Does anyone know how to prevent the .NET application from make a copy of the content of the Q_Property? I have tried to set DESIGNABLE, SCRIPTABLE and STORED all to false without it solving the problem. And yes, I have read the docs.
  • Question: overlay QWidget on third party X11 graphics

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • QGLWidget's child widgets

    10
    0 Votes
    10 Posts
    6k Views
    B
    While the Qt documentation is very good, it does not cover everything. A QGLWidget can't have children widgets. The way a QGLWidget paints and the way other QWidgets paint don't work together automatically. While it is possible to "paint":http://doc.qt.nokia.com/latest/opengl-overpainting.html and "embed widgets":http://doc.qt.nokia.com/qq/qq26-openglcanvas.html, it can't be done by simply adding a child QWidget, and the other mechanisms come with performance consequences.
  • 0 Votes
    2 Posts
    2k Views
    A
    Just call @ setQuery(SQL_SELECT); @
  • Full screen osx Widget - Works the first time then fails.

    2
    0 Votes
    2 Posts
    3k Views
    J
    Ok, I solved the problem but would be interested if anyone could provide me with an explanation. What I found was when the emit fullscreen is called and the windows state the first time (successful full screen) the widget window state is - Qt::WindowNoState. After reverting back to "normal size" the second call to enterFullScreen. The windows state was Qt::WindowFullScreen which is not correct. To fix my problem I added the line @ if(this->windowState()==4) this->setWindowState(this->windowState() ^ Qt::WindowFullScreen); @ to force the window state. After adding this line the full screen/normal screen switch works as expected every time. @ // SIGNAL 0 void VideoPlayerWidget::enterFullScreen() { if(this->windowState()==4) this->setWindowState(this->windowState() ^ Qt::WindowFullScreen); QMetaObject::activate(this, &staticMetaObject , 0, 0); } @ [EDIT: code formatting, Volker]
  • Warning LNK 4217

    5
    0 Votes
    5 Posts
    4k Views
    G
    Sorry, I don't understand what you're doing. Do you compile Qt or your application? If you compile Qt, do not use the sources bundled in a prebuilt package for another compiler suite or version, but get the vanilla sources (qt-everywhere-xxx-src). While it may work to use VS2008 object code in VS2010 with some trickery, it is generally not recommended and you are likely to get no support for that here - despite being told to build Qt in VS2010 manually. Are you bound to Qt 4.6.3? It's quite old, and to my knowledge VS2010 was not supported with that version. I would recommend to use the most recent version 4.7.4, which can be built with VS2010 or 4.8 RC which has prebuilt binaries for VS2010.
  • QWidget : show widget when ctrl + F is pressed

    3
    0 Votes
    3 Posts
    3k Views
    H
    I used QAction and it worked.. Thanks !!
  • [Solved]Controlling scrolling in QListView

    4
    0 Votes
    4 Posts
    8k Views
    T
    Thank you! -- Richard
  • 0 Votes
    13 Posts
    4k Views
    P
    [quote author="Andre" date="1323256622"]Yes. Should be simple enough if you use a line-by-line parsing of your file. Did you try to create an implementation for that yet? Running into any specific issues?[/quote] Ya i have checked reading line by line to find some specific data it is working fine further i am trying some other operation on the data which i need.
  • [SOLVED]Save and load image with database(Postgresql)

    6
    0 Votes
    6 Posts
    11k Views
    H
    Ok I resolve this warning. Now I'm saving picture in this way: @ // like in 1st post QByteArray baPhoto; QBuffer buffer( &baPhoto ); buffer.open( QBuffer::WriteOnly ); ui->lbImage->pixmap()->save( &buffer, "PNG" ); QSqlQuery query; query.prepare( "UPDATE foo_table SET photo = :photo" ); query.bindValue( ":photo", baPhoto.toBase64() ) ); // without toBase64() is warning qDebug() << query.exec(); // return true @ Load pic: @ // we need convert from base64 to standard bytearray pixmap->loadFromData( QByteArray::fromBase64( _val.toByteArray() ) ); @ Thanx for help!
  • Problem with Qtextedit?

    7
    0 Votes
    7 Posts
    3k Views
    F
    Notice that, @ QMainWindow w; w.setStyleSheet("QPushButton { background:#F0F;}"); @ will affect all the push buttons from main window. For instance: @QMainWindow w; w.setStyleSheet("QWidget #menuBar QPushButton{ background:#F0F;}");@ will affect only push buttons from the QWidget named as menuBar. You should use "selectors":http://doc.qt.nokia.com/4.7/stylesheet-syntax.html#selector-types as Rahul said. Its very important in UI creation.
  • Re: QGraphicsItemAnimation

    5
    0 Votes
    5 Posts
    4k Views
    A
    I guess (not: know), that "this section":http://doc.qt.nokia.com/latest/graphicsview.html#animation might be the key: [quote]Animation Graphics View supports animation at several levels. You can easily assemble animation by using the Animation Framework. For that you'll need your items to inherit from QGraphicsObject and associate QPropertyAnimation with them. QPropertyAnimation allows to animate any QObject property.[/quote] So, instead of using the specialized graphics view animation framework, you use the more general Qt animation framework.
  • [Solved]QStandardItemModel

    3
    0 Votes
    3 Posts
    2k Views
    T
    Yes thats the answer. thanks
  • Generating an XML file

    14
    0 Votes
    14 Posts
    15k Views
    F
    Emacs runs even on Windows!
  • How to paste system clipboard content to outside of Qt app

    4
    0 Votes
    4 Posts
    2k Views
    A
    My guess is that you will have to somehow send key events to the application you want to paste into. However, that is outside the scope of Qt. You will have to deal with that in a platform-dependent way yourself.
  • 0 Votes
    13 Posts
    9k Views
    A
    That is a good suggestion, and is probably the fastest code path. I did not think of using find() in such a scenario.
  • [Solved]help serializing a QMultiHash

    7
    0 Votes
    7 Posts
    3k Views
    A
    Doh! I guess we have all been in similar situations. I certainly have!
  • Code for Click on QLabel!?

    16
    0 Votes
    16 Posts
    20k Views
    A
    hi again flat property was grate. :) thanks to all about help me in this case . Best regards
  • 64 bit problem when compile

    4
    0 Votes
    4 Posts
    1k Views
    L
    I have solved with QT # -= gui