Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • MDI sub window's event handling?

    2
    0 Votes
    2 Posts
    3k Views
    W
    Well, for you desperate guys who found this page with google... Just: write a class P which inherites QMdiSubWindow; reimplement QMdiSubWindow::*Event(); use QMdiSubWindow::setWidget(QWidget *); call QMdiArea::addSubWindow(p). [here p is the instance of your class P]
  • QSlider Widget not resizing on Beagleboard running Angstrom

    2
    0 Votes
    2 Posts
    2k Views
    T
    I forgot an important piece. I am using pyqt4.
  • [Solved] reading ID3 tags from MP3 files

    3
    0 Votes
    3 Posts
    6k Views
    T
    Sorry for taking so long to post a reply! It worked, but i ended up using the Taglib libraries to support more formats. Thanks for the Help!
  • QDockWidgets within a QDockWidget

    5
    0 Votes
    5 Posts
    2k Views
    W
    Okay, I got this uploaded hopefully the link works as advertised. It's just a quick and dirty mock up. On the left is a 'master dock widget'. I'd like for the two sections within to be docks that can be re-arranged but only within the master dock widget. "nested QDockWidget mockup":https://docs.google.com/leaf?id=0B_adfg_bb8-fMDcwOTM2MmMtYTAwYS00YTM4LWJlNTQtMGM1Mjc1OTJiNGFl&hl=en_US
  • Qt::TextFlag vs. QTextOption

    2
    0 Votes
    2 Posts
    3k Views
    BilbonSacquetB
    The big difference between both approach is the technology used: QStaticText use internally a QTextDocument to layout, so mainly the interface need a QTextCharFormat and a QTextOption to format the text (mainly rich text). In the case of the font based fonction like, drawText() or QFontMetrics class they are using a simplier layout mechanism, which needs just the align and QTextFormat (mainly single font). Mainly it's 2 differents approachs to render the text.
  • [SOLVED]Problem with the QMdiSubWindow

    6
    0 Votes
    6 Posts
    5k Views
    G
    Ah, I see - good to know you're back and fine now :-) You might check the advise given earlier, and report back if that was the problem.
  • How to show desktop[probably solved]

    9
    0 Votes
    9 Posts
    5k Views
    D
    I didn't consider that. As I understand, the client will use it only in windows-environment.I guess, in this case, problem solved. Thank you.
  • [Closed] QSettings remove

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    A
    This is your third topic on this issue. Please continue in one of your "previous":http://developer.qt.nokia.com/forums/viewthread/11649/ "topics":http://developer.qt.nokia.com/forums/viewthread/11705/. This topic is closed.
  • 0 Votes
    9 Posts
    9k Views
    BilbonSacquetB
    My bad ... you have right!
  • How to convert global coordinate to coordinate relative to parent?

    3
    0 Votes
    3 Posts
    7k Views
    P
    [quote author="Gerolf" date="1321869156"]If you have a widget, you can call "QWidget::mapFromGlobal":http://doc.qt.nokia.com/4.7/qwidget.html#mapFromGlobal[/quote] thanks
  • Windows without title bar but with border

    7
    0 Votes
    7 Posts
    5k Views
    A
    [quote author="holy" date="1321636507"]Thank you for your reply. I am mainly interested in linux desktops. (I know this question is in mobile, but I didn't want to repost)[/quote] -In that case, let me just move it for you.- -In the future, you can just use the "report" link next to your post and request an admin moves it to the correct subforum. - update: I decided to split off the topic, because the " other part":http://developer.qt.nokia.com/forums/viewthread/8140/ was on mobile & embedded (moved that part back there). Thanks for searching the forum before just posting your question, but sometimes it is better to just link to it instead of reviving an old topic.
  • Subclassing QGraphicsRectItem to have a reference rectangle on an image

    3
    0 Votes
    3 Posts
    3k Views
    S
    Yes, I did set that and did not make any difference. I also set the flags in my GraphicsRectItem class to be : @ setFlags(QGraphicsRectItem::ItemIsMovable | QGraphicsRectItem::ItemIsSelectable | QGraphicsRectItem::ItemIsFocusable); setAcceptHoverEvents(true); @ My main problem of at least changing the size of the rectangular item remains. For some reason setRect does not do anything. I have in the paint event of my rect item this: @ void MyRect::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { QPen pen; pen.setStyle(Qt::SolidLine); pen.setColor(QColor(200, 200, 200)); pen.setWidth(2); QBrush brush(Qt::Dense5Pattern); brush.setColor(QColor(200, 200, 200)); painter->setPen(pen); painter->setBrush(brush); painter->drawRect(boundingRect()); } @ And the bounding rect method I did this: @ QRectF MyRect::boundingRect() const { QRectF rect(leftPos, 0, rightPos - leftPos, myScene->sceneRect().height()); return rect; } @ In a different method is where I set the leftPos and rightPos values and do setRect(boundingRect()); I tried before calling this to do prepareGeometryChange() but still no effect. Just for testing I did in the same method setRect(x,y,w,h) instead and gave random values for x,y,w,h and the rectangle doesn't change. Any ideas? I would really appreciate it! Thanks.
  • QSQL SQLite problem

    8
    0 Votes
    8 Posts
    4k Views
    T
    [quote author="JessyNay" date="1318822832"][quote author="ron9776" date="1318822074"]1 qDebug()<<sql.lastError().text();[/quote] I don't get it, What were you trying to say? that's the first answer I got [/quote] It was a spam account. I removed the post and deleted the user.
  • 0 Votes
    2 Posts
    3k Views
    C
    Can you show the GLWidget constructor ?
  • 0 Votes
    3 Posts
    2k Views
    BilbonSacquetB
    First the parent (and the parent of the parent until the QCoreApplication) dispacths it, but if the child (which has the focus or it is the destination) doesn't 'accept' it, it will be handled by the parent (and from the parent of the parent, ...).
  • How to get the event source of a QMenu which is bind to some QPushButtons?

    17
    0 Votes
    17 Posts
    9k Views
    A
    You could considder an alternative approach: How about you subclass QPushButton. In this custom class, you can attach the menu already. Then, you give your button a set of signals corresponding with the items in the menu. You can give these signals an identifier argument to identify the instance of the button. That way, you will have no need to fiddle with sender() or with QSignalMapper.
  • [Solved]Opening a New Form with new Widgets.

    9
    0 Votes
    9 Posts
    4k Views
    Q
    Thanks, I'll remember.
  • [Closed] How to give user defined data type within slot?

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    G
    Duplicating a thread is usually not a means to push a problem. You're not going to reach more co-developers this way, but risk to annoy some that might be of help otherwise. Please stick to the first thread, mentioned earlier - thanks. I'm closing this one.
  • How to recognize type

    10
    0 Votes
    10 Posts
    3k Views
    K
    Yeah, you're right! It's awkward that I've missed that on Stroustrup. So you can just define your template function and then overload it for types that need some special action.
  • Interested in knowing the exact reasoning behind it!!!

    4
    0 Votes
    4 Posts
    3k Views
    BilbonSacquetB
    The reason is simple if you don't have the Q_OBJECT macro, "the class will not be moc'ed":http://doc.qt.nokia.com/4.7/signalsandslots.html in moc_MyThread.cpp and the slots don't exist.